coverlet icon indicating copy to clipboard operation
coverlet copied to clipboard

Add `Threshold` feature to vstest collectors integration

Open MarcoRossignoli opened this issue 5 years ago • 2 comments

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

MarcoRossignoli avatar Jan 08 '20 09:01 MarcoRossignoli

This issue is stale because it has been open for 3 months with no activity.

github-actions[bot] avatar Jul 07 '24 01:07 github-actions[bot]

[!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

Bertk avatar Sep 11 '24 06:09 Bertk