version 7.9.1 LTS
Sometimes, the quality gates passed to green despite coverage condition not reached. In my case, I have 44% on coverage but I should have 60% to pass to green… With 44 % it’s currently green. That’s not the first time I saw this problem and I cannot determine how it appends…
Hi @Cyril035
There are different possible conditions on Coverage in the doc : [Metric Definitions | SonarQube Docs]
(Metric Definitions | SonarQube Docs). Look at the definitions there, that should help selecting the good criteria.
The one you put in your Quality Gate seems to be “Condition Coverage”. I would put the “Coverage New Code” in your QG to check the coverage.
Can you try?
Hi @Carine_Bayon
I agree with that is the coverage on new code that is not reached…
But it’s this setting which is setup on QG config (see first line on second screenshot => Condition coverage on New Code => is less than 60%)
Carine is right – “Coverage on New Code” and “Condition Coverage on New Code” are two separate metrics – (the overall “Coverage” metric is a combination of line and condition coverage).
The metric you’re seeing on your overview is Coverage on New Code, rather than Condition Coverage.
ooh dear, I understand now effectively I didn’t noticed this “little” but important difference…
Ok it looks good for me so.
Thanks to you 2 @Carine_Bayon@Colin