coverlet
coverlet copied to clipboard
Add `Threshold` feature to vstest collectors integration
Today with .net tool/msbuild you can specify a coverage threshold below which it fails the build.
https://github.com/tonerdo/coverlet/blob/master/Documentation/MSBuildIntegration.md#threshold
This is not supported on vstest collector integration
cc: @vagisha-nidhi
This issue is stale because it has been open for 3 months with no activity.
[!TIP] use reportgenerator which supports minimum coverage thresholds
use dotnet-reportgenerator-globaltool to create a HTML report and a merged coverage file
reportgenerator -reports:"**/*.cobertura.xml" -targetdir:"artifacts\reports.cobertura" -reporttypes:"HtmlInline_AzurePipelines_Dark;Cobertura" --minimumCoverageThresholds:lineCoverage=80
https://github.com/danielpalme/ReportGenerator/blob/2a2ed5dadf6f5b17e0dc14c91e711cf5ff991688/src/ReportGenerator.Core/appsettings.json#L7