Versions Compared


  • This line was added.
  • This line was removed.
  • Formatting was changed.


  • The tests execution reports have to comply to the JUnit XML format.
  • The code coverage reports have to be generated by Cobertura, or JaCoCo (details below).with JaCoCo


You need to give the path of test execution and code coverage reports using the following parameters.





sonar.junit.reportPathsProject-widetarget/surefire-reports, myModule/target/surefire-reports

Import tests execution reports (Surefire XML format).

Set the property with a list of comma-separated paths to the directories containing the XML reports.

sonar.jacoco.reportPathsProject-widetarget/jacoco.exec, target/jacoco-it.exec (default)

Import JaCoCo code coverage reports.

Set the property to the path of the JaCoCo .exec reports, merge multiple reports.

(if you are using a version of SonarQube prior to 6.2 please use sonar.jacoco.reportPath property)

Details Further details on using JaCoCo are available in Usage of JaCoCo with Java Plugin . For Cobertura, read the documentation to get more information on how to generate the reports, or you can check the Analyzing with SonarQube Scanner for Maven documentation

A note to Cobertura users

SonarJava does not support import of Cobertura coverage data. A sonar-cobertura plugin exists, however maintenance and support there is entirely community based. More generally speaking, also note that SonarQube provides a tool-agnostic generic solution: Generic Test Data .