question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Cobertura report shows NaN for all complexities

See original GitHub issue

Expected 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.xml on 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:closed
  • Created 3 years ago
  • Comments:6 (6 by maintainers)

github_iconTop GitHub Comments

1reaction
danielpalmecommented, Aug 29, 2020

Merged this into develop branch. Next release will contain your changes.

1reaction
danielpalmecommented, Aug 2, 2020

Will test this in several scenarios. But may take a while, since I’m on vacation.

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found