I used the Jacoco eclipse plugin to measure unit test coverage, and I was able to export the report using it. I want to integrate this report using sonar, so I gave the path to it in the project properties file. My properties file is as follows:
# Required metadata sonar.projectKey=key sonar.projectName=name sonar.projectVersion=1.0 sonar.jacoco.reportPath=jacoco.exec sonar.tests=junit sonar.dynamicAnalysis=reuseReports sonar.java.coveragePlugin=jacoco sonar.jacoco.reportMissing.force.zero=true
When I started the sonar, the following lines were on the console output
16:23:13.219 INFO - Sensor JaCoCoItSensor... 16:23:13.219 INFO - No JaCoCo analysis of project coverage can be done since there is no class files. 16:23:13.219 INFO - Sensor JaCoCoItSensor done: 0 ms 16:23:13.219 INFO - Sensor JaCoCoOverallSensor... 16:23:13.219 INFO - Sensor JaCoCoOverallSensor done: 0 ms 16:23:13.219 INFO - Sensor JaCoCoSensor... 16:23:13.219 INFO - No JaCoCo analysis of project coverage can be done since there is no class files.
Also, the unit test coverage widget indicated "No data." Why can't I get Sonar to display coverage results? What is the right way to do this? This is my first experience with Jacoco, and I'm also new to Sonar, so the detailed guides are very much appreciated.
sonarqube jacoco sonar-runner
Turingscurse
source share