Test coverage average coming as infinity
See original GitHub issueWe use coverlet with all our .NET Core projects(APIs, Libraries) and it works just fine for us.
Recently we have created one .NET Standard library and I have added .NET Core 2.2 xUnit test project in it with 2 tests. We have added coverlet.msbuild 2.5.1 nuget package to calculate the code coverage -
dotnet test -c Release --logger TRX /p:CollectCoverage=true /p:CoverletOutputFormat=opencover /p:CoverletOutput=TestResults
It runs the tests, all tests are passing but the code coverage is showing as empty with average “infinity”. It is not even identifying module name. Please refer attached notepad file for sample output.
What’s going wrong here? Sample output.txt
Issue Analytics
- State:
- Created 4 years ago
- Comments:22
Top Results From Across the Web
Test coverage average coming as infinity · Issue #516
It runs the tests, all tests are passing but the code coverage is showing as empty with average "infinity". It is not even...
Read more >Code coverage for a project with infinite loops : r/rust
The typical way to get code coverage statistics is to have a unit or integration test suite that is run by the coverage...
Read more >How can 100% test coverage be "not enough to prove ...
100% coverage is not 100% path coverage - Most applications have an infinite or near-infinite number of paths through the application. It's not ......
Read more >c# - Code coverage in Testing
This thing keeps me wondering like how this code coverage works i mean they covers code on which bases? please tell the main...
Read more >Code Coverage: What is the goal?
In light of recent research serious doubt has been cast on the usefulness of numerical targets such as 80% test coverage.
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 FreeTop 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
Top GitHub Comments
wow, okay. That fixed it. Can’t believe it is caused by using a project too simple though. Thanks a ton, I was stuck on this for the past hours. The INF% is probably caused by dividing by 0 then
Close because solved…feel free to re-open if needed