简体   繁体   English

使用三叶草报告无法在SonarQube上看到代码覆盖率结果

[英]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.

相关问题 Clover和Jacoco给出不同的代码覆盖率结果 - Clover and Jacoco give different code coverage results 在 Play 中使用 Clover 执行代码覆盖! 使用 Ant 的框架应用程序 - Performing code coverage using Clover on a Play! Framework Application using Ant 我的gradle multiproject + Java + groovy +三叶草+ sonarqube无法在声纳中达到100%代码覆盖率 - unable to reach 100% code coverage in sonar for my gradle multiproject + java + groovy + clover + sonarqube 为什么Clover不总是报告Java Web应用程序的代码覆盖率? - Why doesn't Clover always report code coverage for my Java web app? 使用 Gradle 的 Sonarqube 8 的 Jacoco 代码覆盖率 - Jacoco code coverage for Sonarqube 8 using Gradle 三叶草代码覆盖范围:产品的客户端jar覆盖范围为0 - Clover code coverage: product's client jar is having 0 coverage 三叶草是否也报告失败的单元测试的覆盖范围 - Does clover report coverage of failed unit tests also 无法使用jmockit coverage jar获取代码覆盖率报告 - Unable to get Code Coverage Report using jmockit coverage jar Maven和Gradle之间的三叶草代码覆盖行为不同 - Clover code coverage behavior differs between Maven and Gradle 从 Clover 代码覆盖率中全局排除所有 Spring JavaConfig - Globally exclude all Spring JavaConfig from Clover code coverage
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM