Reduced coverage but quality gate still passes

Hello everyone!

We’re having some issues with quality gates. We’ve set up the gate to be like this:

With this in mind, new code, like a PR branch, should fail if we have less than 80% coverage on it.

To test this setup, we removed some code coverage from a feature branch and pushed it. However, the quality gate is still passing:

This is a Java project, built with Gradle, using JaCoCo for code coverage. We’re using Drone for CI and Sonar analysis.

Does anyone knows how we can fix this?

Hello Rafael!

And welcome to the community forum!

There is a few situation where the condition on coverage won’t actually be taken into account on your PR:

  • When there is just a few lines changed
  • If you only drop test files

Do you fall in one of these case with your test ?