Versions Compared

Key

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

...

Code Block
languagehtml/xml
sonar.surefire.reportsPath=[baseDir]/myReports/myExecutionReports

Code Coverage Report 

Tell Sonar where your code coverage report is: absolute or relative path to the report file for JaCoCo or Cobertura or Clover, directory path for Emma.

First, tell Sonar which code coverage engine has been used to generate the reports: jacoco or cobertura or emma or clover.

 

Code Block
languagehtml/xml
<sonar.java.coveragePlugin>jacoco or cobertura or emma or clover</sonar.java.coveragePlugin>
 
Prior to Sonar 3.4, the property was sonar.core.codeCoveragePlugin.

 

Then, tell Sonar where to get the code coverage reports:

With Maven in your pom file:

Code Block
languagehtml/xml
<sonar.jacoco.reportPath>[baseDir]/myReports/myCodeCoverageReport</sonar.jacoco.reportPath>

...