I am trying to increase the code coverage of our UnitTests and I want to enforce it.
I thought that it might be a great idea to test if the coverage between the last built and the actual built simply increased until a certain threshold. Lets say 80%. If it is higher than 80% I want the built to always pass (as long as the tests are fine). If it stays or decrease lower than 80% I want the built to fail.
Last built Coverage was 60%. Actual built coverage is 60% --> Fail.
Last built coverage was 60%. Actual built coverage is 61% --> Success.
Last built coverage was 85%. Actual built coverage is 84% --> Success.
Last built coverage was 85%. Actual built coverage is 79% --> Fails.
Does this make sense? Is it possible to check this with SonarCube and how to do this?
We use SonarQube Version 6.7.7.
Thank you & Kind regards