Code coverage 0% by unit tests

Hello Alexandr,

First of all, could you please share which version of sonar-java you are using, that would help narrow the issue you are facing, thanks.

When I look at what you reported, what strikes me is the following: properties sonar.jacoco.itReportPath, sonar.jacoco.reportPath, and sonar.junit.reportPath have all been deprecated.
Instead of sonar.jacoco.itReportPath and sonar.jacoco.reportPath, you should be using sonar.coverage.jacoco.xmlReportPaths. I would strongly advice you to have a look and follow what is described in the following coverage guide.

What’s more, sonar.junit.reportPath property was deprecated in sonar-java 4.11 and removed in sonar-java 5.12, you should be using sonar.junit.reportPaths instead, which allow for a comma separated list of reports.

If you are still facing issues after trying the above, can you please also share the log of your analysis.

Best,
-Chris

1 Like