Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Can I get a quality gate to fail if mutation coverage is not high enough?

We are using the default 'SonarQube way' quality gate, which has a 'Mutations Coverage' setting, however this does not seem to cause the gate to fail.

For example, I have a small test project that does not have enough mutation coverage, and reports this as a code smell:

3 more mutants need to be covered by unit tests to reach the minimum threshold of 65% mutant coverage

This comes from a FindBugs quality profile. Is it possible also to fail a quality gate?

like image 798
John Davis Avatar asked Dec 12 '25 21:12

John Davis


1 Answers

You have to modify the quality gate (SonarQube way) by adding a rule, that errors (or warns) if the Mutation coverage is "less than" 65

like image 123
Gerald Mücke Avatar answered Dec 14 '25 18:12

Gerald Mücke



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!