sonarqube - Jacoco reports path not found by sonar-runner -


this question has answer here:

i generated coverage report using eclemma following path :

c:/tmp/coveragereport/report.exec 

this file exists, not empty , readable. sonnar-runner configuration regarding code coverage defined follows :

sonar.java.coverageplugin=jacoco sonar.junit.reportspath=c:/tmp/coveragereport/report.exec 

the analysis completes no data visible in unit test coverage widget.

moreover, following lines during analysis :

18:23:45.036 info  - parsing c:/tmp/coveragereport/report.exec 18:23:45.037 warn  - reports path not found: c:/tmp/coveragereport/report.exec 

any ideas on i'm missing ?

there big difference between sonar.junit.reportpath , sonar.jacoco.reportpath. mixing values.

similarly, there's sonar.jacoco.itreportpath (for non-unit tests based jaocco.exec files ex: jacocoit.exec (if creating integration tests).

now, depending upon version of sonarqube instance (4.x or latest 5.x.x), may need set either sonar.junit.reportpath or sonar.java.junit.reportpath value (which folder containing .xml data).

for ex: if unit tests or integration tests folder's result files (.xmls) in folder build/test-results/ut folder, then:

sonar.java.junit.reportpath=build/test-results/ut 

or

sonar.junit.reportpath=build/test-results/ut 

for code coverage file (.exec), have use:

sonar.jacoco.reportpath=build/jacoco/ut/jacocout.exec 

or

sonar.jacoco.itreportpath=build/jacoco/it/jacocoit.exec 

important - sonar properties:

sonar.jacoco.xxx points filename.

sonar.junit.xxx or sonar.java.junit.xxx points folder name.

sonar.surefire.xxx or sonar.java.surefire.xxx points folder name.

similar sonar.junit.reportpath, there's property called: sonar.surefire.reportpath or sonar.java.surefire.reportpath. sonar docs more under analyzing source code maven/gradle.

http://docs.sonarqube.org/display/scan/analyzing+source+code (expand it).

for ex: under analyze gradle build system, configure analysis properties section/more.


Comments

Popular posts from this blog

javascript - Using jquery append to add option values into a select element not working -

Android soft keyboard reverts to default keyboard on orientation change -

jquery - javascript onscroll fade same class but with different div -