This is a test project that aims at finding the simplest way to reproduce the issue: coverlet-coverage/coverlet#1503
Prerequisites:
- .NET SDK 7.0
- reportgenerator:
dotnet tool install --global dotnet-reportgenerator-globaltool
Steps to reproduce:
- Run
./run-coverage.sh
- Open
./CoverageReports/summary.html
- See that
MyApp.Application.CommandTests
(a tests class) is included in the report
If you don't want to use reportgenerator
, you can also take a look at the
coverage.cobertura.xml
files in TestResults/
and see the culprit line here:
<class name="MyApp.Application.CommandTests" filename="bug-tests-in-coverage\tests\MyApp.Application.Tests\CommandTests.cs" line-rate="0" branch-rate="1" complexity="1">