简体   繁体   English

Sonarqube 4.3不会在Jenkins上触发Cobertura单元测试执行

[英]Sonarqube 4.3 dont trigger Cobertura unit test execution on Jenkins

we had SonarQube v3.4 and recently upgraded to SonarQube V4.3. 我们有SonarQube v3.4,最近升级到SonarQube V4.3。 Also we use Jenkins to build and trigger sonar analysis on Maven projects and Cobertura as the code coverage tool. 我们还使用Jenkins构建和触发Maven项目的声纳分析和Cobertura作为代码覆盖工具。

In the version 3.4, Sonar used to trigger (with Jenkins) the cobertura execution and collect the data, but when we upgraded to Sonar 4.3, there was no option in Sonar to select the default code-coverage tool, the Jenkins Sonar execution no longer triggers cobertura and unit test execution. 在版本3.4中,Sonar用于触发(使用Jenkins)cobertura执行并收集数据,但是当我们升级到Sonar 4.3时,Sonar中没有选择默认代码覆盖工具的选项,Jenkins Sonar不再执行触发cobertura和单元测试执行。 Now it expects a Jacoco dump file in order to provide coverage data to sonar. 现在它需要一个Jacoco转储文件,以便为声纳提供覆盖数据。

I cannot find any useful documentation in Sonarqube confluence. 我在Sonarqube汇合处找不到任何有用的文档。

How can we configure Sonar to use Cobertura (without modifying ALL the projects pom files) and trigger code coverage unit test execution from Jenkins?. 我们如何配置Sonar使用Cobertura(不修改所有项目的pom文件)并从Jenkins触发代码覆盖单元测试执行?

Thanks!. 谢谢!。

Since version 2.2 of Java Plugin and 1.6 of Cobertura plugin, SonarQube does not trigger unit test execution anymore : Only reuse report mode is available. 从Java插件2.2版和Cobertura插件1.6版开始,SonarQube不再触发单元测试执行:只有重用报告模式可用。

Please note that the recommended version for both of those plugins are the fixed versions Java 2.2.1 and Cobertura 1.6.1 to prevent the collision between JaCoCo and Cobertura plugin (which will happen with 2.2). 请注意,这两个插件的推荐版本是固定版本Java 2.2.1和Cobertura 1.6.1,以防止JaCoCo和Cobertura插件之间的冲突(这将发生在2.2)。

Because of all this, the property to select the default code coverage tool is not relevant anymore and you only have to provide a coverage report (either cobertura or JaCoCo) to get your coverage information. 由于这一切,选择默认代码覆盖率工具的属性不再相关,您只需提供覆盖率报告(cobertura或JaCoCo)来获取您的覆盖信息。

Please refer to these piece of documentation to get a rough idea on how to do so : http://docs.codehaus.org/display/SONAR/Cobertura+Plugin http://docs.codehaus.org/display/SONAR/JaCoCo+Plugin 请参考这些文档以大致了解如何执行此操作: http//docs.codehaus.org/display/SONAR/Cobertura+Plugin http://docs.codehaus.org/display/SONAR/JaCoCo +插件

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM