Code coverage threshold does not fail if no coverage generated #1083
Labels
bug
Something isn't working
driver-console
Issue related to dotnet net tool driver
driver-msbuild
Issue related to msbuild driver
Priority:0
Critical to the release
untriaged
To be investigated
If coverlet.msbuild is configured with a
Threshold
value for a minimum code coverage required by tests, but then no coverage is output for coverlet for some reason, then rather than fail the build, it instead passes because the total coverage is given as 100%.You can also see the average is reported as
NaN%
.See reactiveui/refit#1073 for a scenario where this behaviour masked an issue with code coverage generation because tests still passed.
Coverlet should fail the build and draw the developer's attention to the issue, rather than give a false impression that code coverage is being maintained above previous thresholds configured by the repository.
The text was updated successfully, but these errors were encountered: