1
votes

I want to see code coverage results for my project on SonarQube using Clover. I have followed all the steps given on SonarQube's website. I generated the JUnit and Clover coverage report and specified their paths in sonar-project.properties file. But I somehow cannot see the code coverage results on the Sonar web interface. It just shows a '-' instead of showing the percentage. The code coverage is about 60% in the clover eclipse plugin. I have attached the sonar-project.properties file here. I am using sonar-runner-2.4 for analysis, Clover 3.2.2 and SonarQube 4.1.2.

sonar.projectKey=myprojkey
sonar.projectName=myprojname
sonar.projectVersion=1.0

sonar.sources=/src
sonar.binaries=/WebContent/WEB-INF/classes
sonar.language=java
sonar.dynamicAnalysis=reuseReports
sonar.junit.reportsPath=/Reports
sonar.java.coveragePlugin=clover
sonar.clover.reportPath=/Reports/coverage.xml
sonar.libraries=/WebContent/WEB-INF/lib/*.jar,E:/apache-tomcat-7.0.42/lib/*.jar,C:/eclipse/plugins/com.cenqua.clover.runtime_3.3.0.v20140331000000/*.jar
sonar.sourceEncoding=UTF-8 
1
Which version of the sonar-clover plugin are you using ?benzonico
Clover 3 (for Eclipse 3.6 - 4.3 and RAD 8.0 - 9.0) 3.3.0.v20140331000000umairaslam

1 Answers

0
votes

Try using the absolute path for clover reportpath properties. For windows box you can try using the below

sonar.clover.reportPath=\\target\\site\\clover\\clover.xml