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.

Different output format results in different coverage percentage

See original GitHub issue

I would have assumed that the code coverage output format ist just that - a file format. But it seems like using a different output format also affects code coverage percentage. Is this by design?

Example: I use a .NET regular expression source generator in my code. When I use dotnet test with the argument --collect:"XPlat Code Coverage;Format=cobertura" then it does count the generated code in the namespace System.Text.RegularExpressions.Generated. When I use dotnet test with the argument --collect:"XPlat Code Coverage;Format=opencover" then it does not count the generated code.

Package: coverlet.collector 6.0.0 .NET 7

Issue Analytics

  • State:open
  • Created a month ago
  • Comments:8

github_iconTop GitHub Comments

1reaction
cremorcommented, Aug 21, 2023
1reaction
cremorcommented, Aug 14, 2023

Thanks for the analysis. I’ll test this again in a few days.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Code coverage testing - Visual Studio (Windows)
Learn how to use the code coverage feature of Visual Studio to determine what proportion of your project code is being tested by...
Read more >
Tutorial - Measuring code coverage
The coverage percentage for a source file is calculated as 100 * (NE + NFE) / (NS + NF) , where NS is...
Read more >
How can I use pytest-cov to both generate a coverage ...
Run pytest under coverage, either with pytest-cov, or with coverage run -m pytest . Then generate coverage reports from the results. – Ned ......
Read more >
coverlet/Documentation/MSBuildIntegration.md at master
Coverlet can generate coverage results in multiple formats, which is specified using the CoverletOutputFormat property. For example, the following command ...
Read more >
Test coverage overview - SonarQube Docs
Test coverage reports tell you what percentage of your code is covered by your test cases. Test execution reports tell you which tests...
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