sonarqube v4.3 cobertura报道

时间:2014-05-12 18:07:48

标签: code-coverage sonarqube cobertura jacoco

我使用的是声纳4.2和声纳 - 跑步者2.3和cobertura插件。

将声纳升级到4.3并将声纳跑步器升级到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

1 个答案:

答案 0 :(得分:0)

我们在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