如何使用 Hudson 的 Maven 生成 Cobertura 代码覆盖率报告
在我的项目中,我需要使用 maven build 从 Hudson 创建 Cobertura 代码覆盖率报告。
在 Hudson 中,我添加了 Cobertura 代码覆盖率插件。
我需要pom.xml的完整修改步骤。
In my project I need to create Cobertura Code Coverage report from Hudson using maven build.
In Hudson I have added the Cobertura Code Coverage plugin.
I need the complete modification steps of pom.xml.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(4)
您是否尝试将其添加到
reporting
部分的pom.xml
中?完整的配置步骤可以在此处找到。
Did you try to add this to your
pom.xml
in thereporting
section?Complete configuration steps can be found here.
Hudson 需要您生成
coverage.xml
文件。要在不更改pom.xml
的情况下执行此操作,您可以使用:Hudson needs a you to generate the
coverage.xml
file. To do this without changing yourpom.xml
, you can use:要在打包阶段运行 Cobertura,请执行
下面的 pom 示例
http://macgyverdev.blogspot.com/2011/04/development-environment-for-google-app.html
这里是如何集成到 Hudson 中
http://macgyverdev.blogspot.com/2011/ 04/hudson-continous-integration-for-google.html
To run Cobertura during package phase, do
Heres an example of pom
http://macgyverdev.blogspot.com/2011/04/development-environment-for-google-app.html
And here how to integrate in Hudson
http://macgyverdev.blogspot.com/2011/04/hudson-continous-integration-for-google.html
Cobertura 实际上似乎并不与 Hudson 合作。
我有一个执行命令行的项目:
mvn clean package
构建覆盖率报告生成准确的覆盖率报告,平均覆盖率约为 78% 行和 74% 分支。
在 Hudson 服务器上运行相同的目标会导致覆盖率报告显示 0% 0%。
不幸的是,该插件的 Jira 网站似乎不允许任何人发布问题,因此该问题尚未报告给团队。
Cobertura doesn't actually seem to work with hudson.
I have a project where executing the command line:
mvn clean package
Builds a coverage report generates an accurate coverage report with an average coverage of about 78% line and 74% branch.
Running the same goals on a Hudson server results in a coverage report showing 0% 0%.
Unfortunately the Jira site for the plugin doesn't seem to allow anyone to post issues so this issue is as yet unreported to the team.