Best practices for increasing code coverage

The distinction is modifying legacy code counts as new code for sonar :wink:

Yes we just track overall coverage. We started on 0% overall coverage. As % overall coverage improved we increased the % new code coverage quality gate in line with that.

e.g if % new code coverage quality gate is set to 5%, its very unusual a developer tries to only write the sonar limit of 5% worth of tests, its usually much higher after tests have been written. But it gives the developers the flexibility to determine what is realistic given the state of the legacy code.

1 Like