声纳中没有JUnit测试报告

时间:2014-10-09 12:47:54

标签: junit jenkins sonarqube maven-surefire-plugin

单元测试覆盖率正在运行但不是单位报告,它告诉我0。

我的sonar-project.properties中有一个多模块项目我定义了这两行:

# Tells SonarQube where the unit tests execution reports are
sonar.junit.reportsPath=target/surefire-reports

# Tells SonarQube where the unit tests code coverage report is
sonar.jacoco.reportPath=target/coverage-reports/jacoco-ut.exec

当我查看jenkins日志时,我看到了:

Sensor JaCoCoSensor...
- Analysing C:\Users\Administrateur\workspace\MyProject\ModuleA\target\coverage-reports\jacoco-ut.exec
- Sensor JaCoCoSensor done: 8253 ms

此处路径看起来不错,但不适用于单元测试报告:

- Sensor SurefireSensor...
- parsing C:\Users\Administrateur\workspace\MyProject\.sonar\sonar.projectKey_sonar.modules\target\surefire-reports
- Sensor SurefireSensor done: 0 ms

它查看根目录下的.sonar /目录,而不是模块的目标/目录。

对这个问题有什么看法?谢谢!

0 个答案:

没有答案