Code coverage 0% by unit tests


Must-share information (formatted with Markdown):

  • SonarQube 6.7.4
  • Code coverage by unit tests
  • mvn sonar:sonar -Dsonar.login=…

My pom.xml:



Can you help me please? =)

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.


1 Like

I am having the same problem. After switching to JUnit 5, all the code coverage reporting went to 0%. I took the example from and modified maven-multimodule from JUnit 4, and switched it to JUnit 5. The sample has the same problem.

The only changes made to create the issue was

  1. Changing the test imports to
    import org.junit.jupiter.api.Test;
  2. and changing the pom JUnit dependency to


Hello @Derek

I saw that you opened another topic related to this subject.
Since the original post is quite old and it seems to be related to another problem, creating a new one was the right move.

Bumping this one was not though, please be careful next time!

I will have a look and answer on the other one, please continue the discussion there if needed.


Hey, how you doing?

I have an example project with Junit5 working at



This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.