[英]Cannot see code coverage results on SonarQube using clover report
I want to see code coverage results for my project on SonarQube using Clover. 我想使用Clover在SonarQube上查看我的项目的代码覆盖结果。 I have followed all the steps given on SonarQube's website. 我已按照SonarQube网站上给出的所有步骤进行操作。 I generated the JUnit and Clover coverage report and specified their paths in sonar-project.properties file. 我生成了JUnit和Clover覆盖率报告,并在sonar-project.properties文件中指定了它们的路径。 But I somehow cannot see the code coverage results on the Sonar web interface. 但是我不知怎么在Sonar Web界面上看不到代码覆盖率的结果。 It just shows a '-' instead of showing the percentage. 它仅显示“-”而不是百分比。 The code coverage is about 60% in the clover eclipse plugin. 三叶草eclipse插件中的代码覆盖率约为60%。 I have attached the sonar-project.properties file here. 我在这里附加了sonar-project.properties文件。 I am using sonar-runner-2.4 for analysis, Clover 3.2.2 and SonarQube 4.1.2. 我正在使用sonar-runner-2.4,Clover 3.2.2和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
Try using the absolute path for clover reportpath properties. 尝试对三叶草reportpath属性使用绝对路径。 For windows box you can try using the below 对于Windows框,您可以尝试使用以下内容
sonar.clover.reportPath=\\\\target\\\\site\\\\clover\\\\clover.xml
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.