1

I am running coverlet in my Linux CI box. Right now, after I run the command below, regardless if the threshold is met or not, when I check the $? value, the command always returns 0.

dotnet test -p:CollectCoverage=true -p:Threshold=95

I need coverlet to return 0 if all tests passes, and unit test coverage is above the threshold, and 1 if either any of the tests fail, or the threshold is not met.

Has anyone seen this problem before, or know how to fix it? Thanks!

Zorthgo
  • 2,857
  • 6
  • 25
  • 37
  • I don't unse coverlet, but according to [this discussion](https://github.com/tonerdo/coverlet/issues/388), exit code 1 is supposed to be returned whenever a test fails, whether below or above threshold. If this is not the case for your tests, I suggest that you open an issue at github. Make sure that you have a simple, reproducible example which demonstrates the effect. – user1934428 Jan 22 '20 at 07:33

0 Answers0