【问题标题】:sonarqube v4.3 cobertura reportssonarqube v4.3 cobertura 报告
【发布时间】:2014-06-30 05:15:14
【问题描述】:

我使用的是 sonar 4.2 和 sonar-runner 2.3 以及 cobertura 插件。

在升级 sonar 到 4.3 和 sonar-runner 到 2.4 之后,我所有的项目都是 0% 覆盖率。

日志包含:

14:57:28.135 INFO  - Sensor JaCoCoSensor...
14:57:28.135 INFO  - Project coverage is set to 0% as no JaCoCo execution data has been dumped: C:\Desenvolvimento\shared_view\SILCE\TE151\03-Implementacao\Componentes\caixa-util\target\jacoco.exec
14:57:28.464 INFO  - Sensor JaCoCoSensor done: 329 ms
14:57:29.089 INFO  - Execute decorators...

我的 sonar-project.properties:

#http://docs.codehaus.org/display/SONAR/Analysis+Parameters


# required metadata
sonar.projectKey=br.gov.caixa:caixa-util
sonar.projectName=caixa-util
sonar.projectVersion=1.000


# path to source directories (required)
sonar.sources=src

# path to test source directories (optional)
sonar.tests=test

# path to project binaries (optional), for example directory of Java bytecode
sonar.binaries=build/classes

# optional comma-separated list of paths to libraries. Only path to JAR file and path to directory of classes are supported.
sonar.libraries=../caixa-lib/lib/cobertura/1.9.4.1/cobertura.jar,../caixa-lib/lib/cache/ehcache-core-2.5.0.jar



# Uncomment this line to analyse a project which is not a java project. 
# The value of the property must be the key of the language.
#sonar.language=cobol

# Additional parameters
#my.property=value

#clearcase
sonar.scm.url=scm\:clearcase|caixa-util


#coverage
#teste de cobertura
sonar.java.coveragePlugin=cobertura
sonar.dynamicAnalysis=reuseReports
sonar.junit.reportsPath=build/docs-temp/junit
sonar.cobertura.reportPath=build/docs/cobertura-reports/coverage.xml

【问题讨论】:

  • 你好,能提供cobertura、jacoco和java插件的版本吗?谢谢。
  • 声纳和插件是最新的。 cobertura 插件版本:1.6 分析我的代码,cobertura 1.9.4.1

标签: code-coverage sonarqube cobertura jacoco


【解决方案1】:

我们在 Java 2.2 和 Cobertura 1.6 上有一个问题:Cobertura 1.6 的重用报告不起作用,因此您必须等待修复版本 java 2.2.1 和 cobertura 1.6.1 发布(这将很快发生,SonarQube 开发邮件列表上的投票已开放:http://sonarqube.15.x6.nabble.com/sonar-dev-VOTE-Cobertura-version-1-6-1-td5024837.htmlhttp://sonarqube.15.x6.nabble.com/sonar-dev-VOTE-Java-Plugin-version-2-2-1-td5024834.html )。

请注意,在这些版本中,由于 SonarQube 分析不再执行测试,您必须自己生成 cobertura 报告:检查http://docs.codehaus.org/display/SONAR/Cobertura+Plugin

【讨论】:

    猜你喜欢
    • 2015-12-29
    • 2021-07-29
    • 2016-07-12
    • 2017-01-03
    • 2010-11-04
    • 2010-11-14
    • 2013-04-27
    • 1970-01-01
    • 2011-03-02
    相关资源
    最近更新 更多