1

Is there a way to get the difference in coverage percentage? My goal is to fail a build when the coverage has decreased.

I can easily get the current coverage percentage and compare it to a threshold number. However I want to compare it to the original coverage percentage.

Currently getting coverage report with gotestsum --junitfile-testcase-classname=short --junitfile-testsuite-name=relative -coverprofile="service.out" ./...

treesan
  • 49
  • 2
  • 2
    You need to store your previous result somewhere. For example using the output option and source controlling it. Alternativly, you could run the tests on a different branch but its probably not a good solution. – The Fool Feb 06 '23 at 19:21

0 Answers0