如何将完整的 PartCover 结果纳入 TeamCity 5?
我正在尝试在 TeamCity 5.0 中正确生成 PartCover 报告。当我单击构建详细信息中的“代码覆盖率”选项卡时,报告为空。
我正在使用 sln2008 构建代理,我的 PartCoverage 设置如下:
包括模式:
[*]*
报告 XSLT:
C:\Program Files\PartCover .NET 2.3\xslt\Report By Assembly.xslt=>ByAssembly.html
C:\Program Files\PartCover .NET 2.3\xslt\Report By Class.xslt=>ByClass.html
如果您能描述如何在 TeamCity 发送的成功/失败电子邮件中包含这些报告(或仅重要部分),则加分构建。如果可能的话,我想继续使用 sln2008 构建代理,而不是其他构建代理。
I'm trying to get PartCover reports to generate correctly in TeamCity 5.0. When I click the Code Coverage tab in the build details, the reports are empty.
I'm using the sln2008 build agent and my PartCoverage settings are as follows:
Include Patterns:
[*]*
Report XSLT:
C:\Program Files\PartCover .NET 2.3\xslt\Report By Assembly.xslt=>ByAssembly.html
C:\Program Files\PartCover .NET 2.3\xslt\Report By Class.xslt=>ByClass.html
Bonus points if you can describe how to include those reports (or just the important parts) with the email that TeamCity sends for successful/failed builds. I would like to continue using the sln2008 build agent, if possible, and not a different build agent.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(5)
我对 PartCover 报告也有同样的问题。因此,我一直在努力使其正常工作,但我刚刚发现问题出在 PartCover 发行版附带的两个 XSLT 文件上。
我修复了这些文件,现在一切正常:
按程序集报告
按班级报告
我希望您觉得这很有用。此外,欢迎有关此文件的任何反馈,以便我们可以向社区提供正确的文件。
I had the same problem with the PartCover reports. So I have been trying to make it work right and I just discovered that the problem was the two XSLT files that come with the PartCover distribution.
I fixed these files and now everything is working fine for me:
report by assembly
report by class
I hope you find this useful. Also, any feedback about this files is welcomed, so we can provide the commutiy with correct files.
在对 yeyeyerman 的固定报告进行了一些研究之后,我终于创建了一个全新的 XSLT 报告,其中还包含方法级别的覆盖详细信息和其他一些有趣的内容。
您可以从我的博客文章下载 XSLT:http: //gasparnagy.blogspot.com/2010/09/detailed-report-for-partcover-in.html
After playing a little bit with the fixed reports from yeyeyerman, I've finally created a completely new XSLT report, that also contains method-level coverage details and some other interesting stuff.
You can download the XSLT from my blog post here: http://gasparnagy.blogspot.com/2010/09/detailed-report-for-partcover-in.html
我自己刚刚经历过这个问题。我以为我通过使用 yeyeyerman 的答案解决了这个问题。事实上,它会构建,但是阅读构建报告我可以看到“程序集报告”无法编译。原因是“按程序集报告”在最后缺少 2 行 xml:
将其添加到文件末尾解决了样式表编译问题,因为标签之前没有正确关闭:)。
Just having run through this problem myself. I thought I solved the issue by using yeyeyerman's answer. Indeed, it will build, but reading the build report I could see the "report by assembly" couldn't be compiled. Reason was that "report by assembly" was missing 2 lines of xml at the very end:
Adding that to the end of the file solved the stylesheet compilation issue, as the tags weren't properly closed before :).
问题可能只是xsl - 我最初假设使用partcover安装的文件无需修改即可工作,但它似乎与输入文件不匹配 - 第一个重要行是
有很大不同
与代码大小的计算也似乎 错误 - 应该是 ./Method/pt 而不是 ./method/code/pt
The problem may just be the xsl - I initially assumed that the files installed with partcover would work without modification, but it seems not to match the input file - the first significant line is
which is quite different from
The calculations for code size also appear to be wrong - it should be ./Method/pt rather than ./method/code/pt
请检查测试是否在 x86 下运行。
确保将partcover安装到构建代理计算机上的C:\Program Files\PartCover .NET 2.3\xslt。
请检查构建代理 Windows 服务是否在管理员用户帐户下运行,而不是在本地系统帐户下运行。
Please check tests are running under x86.
Make sure partcover is installed to the C:\Program Files\PartCover .NET 2.3\xslt on the build agent machine.
Please check build agent windows service is running under administrator user accound, but not under LOCAL SYSTEM account.