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.

Branch coverage mismatch between Coverlet and generated OpenCover report

See original GitHub issue

Hi!

I have a situation where Coverlet reports the following.

 Generating report 
+----------+------+--------+--------+
| Module   | Line | Branch | Method |
+----------+------+--------+--------+
| DbReader | 100% | 99.7%  | 100%   |
+----------+------+--------+--------+

Then if I convert the coverage.opencover.xml to an HTML report using ReportGenerator I get a branch coverage of 100%

image

Where should I start to look here? Is there some way to make Coverlet output exactly where the branch coverage is insufficient?

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:6

github_iconTop GitHub Comments

1reaction
MarcoRossignolicommented, May 6, 2019

Ok I’ll take a look ASAP.

1reaction
seesharpercommented, May 6, 2019

Hi @MarcoRossignoli and thanks for your quick reply.

Here is my coverage file 👍

coverage.json.zip

Read more comments on GitHub >

github_iconTop Results From Across the Web

Branch coverage differs between OpenCover and Cobertura
ReportGenerator reports 50% branch coverage for both of your files. OpenCover counts one extra branch for the method. ReportGenerator only takes ...
Read more >
OpenCover C# Branch Coverage says there should be a ...
Basically, the compiler generates some extra code in an async method, and OpenCover looks at the compiled code. I was not able to...
Read more >
Wrong code coverage report (based on opencover format)
Error observed: The opencover report shows 100% line and branch coverage, but SonarCloud shows less. Potential workaround: I have changed the ...
Read more >
Code Coverage Metrics - Steve Dunn
This post looks at code coverage metrics - how they're generated, how to view them ... To get an OpenCover report, we need...
Read more >
Collect human-readable code coverage report for .net core ...
Collect the coverage in a folder (./CodeCoverage in my case) and mention the format opencover. WHY opencover? ReportGenerator will generate a human-readable ...
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