2

Hi I have set up a groovy project analyzing with sonar-runner, it works for complexity, lines of code etc but the code coverage shows "-" and unit testing is 0%. This is the sonar-runner properties file I am using Groovy plug in 0.6 Sonar runner 2.3 Sonar Qube 3.7 Jacoc

sonar.projectKey=Groovy
sonar.projectName= Groovy SonarQube Runner
sonar.projectVersion=1.0

sonar.sources=src
sonar.language=grvy
sonar.binaries=target/classes
sonar.libraries=lib
sonar.junit.reportsPath=test/unit
sonar.core.codeCoveragePlugin=jacoco
sonar.jacoco.reportPath=test/coverage/jacoco.exec

sonar.sourceEncoding=UTF-8

I was wondering if somebody could point me in the right direction

4

1 回答 1

4

当使用 SonarQube Runner 运行 SonarQube 分析时,您应该知道测试没有执行:这就是您没有得到结果的原因。

这意味着您必须确保它们在分析之前已执行,并且结果已导出。

仅供参考,您可以在此处查看示例项目:https ://github.com/SonarSource/sonar-examples/tree/master/projects/languages/groovy

于 2013-11-15T16:41:38.073 回答