Cobertura report shows NaN for all complexities
See original GitHub issueExpected Behavior Creating the Cobertura report type should include Cycolmatic Complexity, and highlight Risk Hotspots.
Observed Behavior
- Step 1: Run
dotnet test --collect:"XPlat Code Coverage" --settings .\coverlet.runsettings.xmlon a .Net Core 3.0 project- coverlet.runsettings.xml:
<?xml version="1.0" encoding="utf-8" ?> <RunSettings> <DataCollectionRunSettings> <DataCollectors> <DataCollector friendlyName="XPlat code coverage"> <Configuration> <Format>cobertura</Format> <Exclude>[*.Tests]*</Exclude> <IncludeTestAssembly>false</IncludeTestAssembly> </Configuration> </DataCollector> </DataCollectors> </DataCollectionRunSettings> </RunSettings> - Step 2: run
reportgenerator "-reports:*\TestResults\*\*.xml" "-targetdir:coveragereport" -reporttypes:""HTMLInline_AzurePipelines;Cobertura"on a .Net Core 3.0 project,
The HTML Report shows cyclomatic complexity numbers, and risk hotspots as expected. The Cobertura.xml file has complexity="NaN" for every package, class, and method. And since all complexities are NaN, no Risk Hotspots show.
Issue Analytics
- State:
- Created 3 years ago
- Comments:6 (6 by maintainers)
Top Results From Across the Web
How to check that the code/test-coverage of cobertura.xml ...
1 Answer 1 ... Cobertura report provides line coverage information as 'line-rate' attribute. It contains value in range from 0 to 1 (1...
Read more >Generate Report for nodejs code coverage · Issue #209
Hello, I am trying to generate report from cobertura coverage for a nodejs app. ... branches-covered="0" branches-valid="0" complexity="NaN" ...
Read more >Add C#/.NET Core Cobertura report parsing to Test ...
As a developer, I want code coverage reports generated by Coverlet to be parsed by the Test Coverage Visualization, so I can see...
Read more >Introduction to Cobertura
A quick and practical guide to generating code coverage reports with Cobertura. ... The high level overview of all the articles on the...
Read more >Optimizing Cluster Density on Illumina Sequencing Systems
With optimal clustering, they will reflect numeric intensity values. With overclustering, 0s and/or NaNs. (not a number) can be reported in these fields...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

Merged this into develop branch. Next release will contain your changes.
Will test this in several scenarios. But may take a while, since I’m on vacation.