Merge coverage reports with conditional coverage

Must-share information (formatted with Markdown):

  • which versions are you using (SonarQube, Scanner, Plugin, and any relevant extension): * 8.9.10 (build 61524)
  • how is SonarQube deployed: zip, Docker, Helm: Helm
  • what are you trying to achieve: Have 100% coverage
  • what have you tried so far to achieve this: Use two reports

Do not share screenshots of logs – share the text itself (bonus points for being well-formatted)!

I have two reports that together show 100% coverage, but each of them have 50% for a line with condition:

<line number="56" hits="1" branch="true" condition-coverage="50% (1/2)" missing-branches="57"/>

and

<line number="56" hits="1" branch="true" condition-coverage="50% (1/2)" missing-branches="59"/>

But SonarQube shows this on line 56:

Partially covered by tests (1 of 2 conditions).

Is there a way to tell SQ to merge those reports properly?

Hi,

Your version is past EOL. You should upgrade to either the latest version or the current LTA (long-term active version) at your earliest convenience. Your upgrade path is:

8.9.10 → 9.9.4 → 10.4 (last step optional)

You may find these resources helpful:

If you have questions about upgrading, feel free to open a new thread for that here.

If your issue persists after upgrade, please come back to us.