Skip to end of metadata
Go to start of metadata


It is possible to feed SonarQube with tests execution and code coverage reports.

See Component Viewer on Unit Test File or Quality Flows > Lack of Unit Tests to browse the results in the web interface.


To be reused by SonarQube:

  • The tests execution reports have to comply to the JUnit XML format.
  • The code coverage reports have to be generated by JaCoCoCobertura or Clover.

You can check the page of each coverage plugin to get more information on how to generate the reports or you can check the Analyzing with Maven documentation.

JaCoCo, Surefire and "argLine"


If you use JaCoCo and define argLine in Surefire configuration, please check JaCoCo plugin page for a note on the best usage.


When no reports are found, coverage value is not set. This behaviour can be overriden by a property for JaCoCo, please check the JaCoCo plugin page to see how.


You can set the following properties to import those reports:

Project samples are available on github that can be browsed or downloadedprojects/languages/java/code-coverage/ut

  • No labels