如何将 NUnit 输出转换为 HTML 报告

发布于 2024-09-05 11:11:52 字数 518 浏览 3 评论 0原文

有人对可以从 NUnit 的 XML 输出生成 HTML 报告的好工具(xslt 或其他工具)有任何建议吗?

我们目前正在使用 NUnit 2.5.5 在我们的代码库上运行大量测试。开发团队很高兴看到 GUI 和控制台运行器中的输出以及我们的 Hudson 服务器上显示的报告。

Hudson 生成的报告需要用户单击链接以深入了解一些详细信息。我想制作一份适合向管理层和/或客户展示的单一文档报告。

到目前为止,我找到的唯一工具是 http://nunit2report.sourceforge.net/ ,它没有'自 2003 年以来一直更新,基于旧版本的 NUnit(我认为报告格式可能已发生重大变化?)并且是一项 nant 任务(我们不使用 nant)。

在我花费太长时间尝试修改 nunit2reports xslt 以适应最近的 NUnit 输出之前,有人能指出一个更合适的工具吗?

非常感谢。

Does anyone have any suggestions for a good tool, xslt or other that can produce an HTML report from the XML output of NUnit?

We're currently using NUnit 2.5.5 to run a number of tests on our code base. The dev team are happy seeing the output in the GUI and console runners and the report shown on our Hudson server.

The Hudson generated report needs a user to click links to drill down to some of the details. I would like to produce a single document report suitable for showing to management and/or the client.

Thus far, the only tool I've found is http://nunit2report.sourceforge.net/ which hasn't been updated sine 2003, is based on an old version of NUnit (I think the report format might have changed significantly?) and is a nant task (we don't use nant).

Before I spend too long trying to doctor nunit2reports xslt's to suit the recent NUnit's output, can anyone point be to a more suitable tool?

Many thanks.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(6

梦萦几度 2024-09-12 11:12:01

看起来这是最容易搜索的 NUnit HTML 答案。
因此,对于 NUnit 3 Allure 将是最好的选择

Allure

https://github.com/allure -framework/allure2 - 全局仓库

https://github.com/unickq/allure-nunit - 对于 NUnit

Looks like this is the most searchable NUnit HTML answer.
So for NUnit 3 Allure would be the best option

Allure

https://github.com/allure-framework/allure2 - global repo

https://github.com/unickq/allure-nunit - for NUnit

一身软味 2024-09-12 11:12:00

NAntContrib 中还有一个“nunit2report”任务(最近随 NAnt 0.91 版本更新)。

NAntContrib NUnit2Report 任务

There's also an 'nunit2report' task in NAntContrib (which was recently updated with the NAnt 0.91 release).

NAntContrib NUnit2Report Task

記憶穿過時間隧道 2024-09-12 11:11:59

这看起来不错,可与 NUnit3 配合使用,是免费的,并且自 2017 年 9 月起得到积极维护:
https://ghpreporter.github.io/

Github:
https://github.com/GHPReporter/Ghpr.Core

示例报告:
http://ghpreporter.github.io/report/?currentTab=runs-stats

This looks decent, works with NUnit3, is free and actively maintained as of Sept 2017:
https://ghpreporter.github.io/

Github:
https://github.com/GHPReporter/Ghpr.Core

Sample Report:
http://ghpreporter.github.io/report/?currentTab=runs-stats

花落人断肠 2024-09-12 11:11:58

对于感兴趣的人,我找到了另外两个工具。

两者都可以在 Lauchpad 上找到,从上面链接的非常基本的产品页面链接到。

不幸的是,这些工具都没有提供我们安装所需的详细程度 - 所以我最终修改了 nunit2report 附带的 xslt 以满足需求。

For anyone interested, I found two other tools.

Both are available on Lauchpad, linked to from the very basic product pages linked above.

Unfortunately, neither of these tools provided the required level of detail for our installation - so I ended up doctoring the xslt's that came with nunit2report to suit out needs.

≈。彩虹 2024-09-12 11:11:57

我知道这是一个老问题,但这是 Google 关于这个主题的最高结果,我认为它值得一提。我工作的地方也有完全相同的问题,所以我们开发了一个小应用程序,它将解析 XML 结果文件并输出基于 bootstrap 3 的漂亮的独立 HTML 页面。代码和二进制文件可在 GitHub 上获取。它反应灵敏,我们可以通过电子邮件将报告发送到移动设备。

I know this is an old question, but it's the top result in Google on the subject and thought it deserved a mention.. Where I work had the exact same issue so we developed a little app that will parse an XML results file and output a nice looking self-contained HTML page based on bootstrap 3. Code and binaries are available on GitHub. It's responsive as well as we email the reports to mobile devices.

债姬 2024-09-12 11:11:56

ReportUnit 不再维护,并被 extentreports-dotnet-cli 取代。


您还可以尝试 ReportUnit,它还支持 Gallio、xUnit、TestNG 和 MSTest:http://reportunit.relevantcodes.com

这是一个简单的 exe 文件,它将把您的 xml 报告转换为 HTML 仪表板(示例):

用法:

reportunit "path-to-folder" // folder-level report
reportunit "path-to-folder" "output-folder" // folder-level report
reportunit "Result.xml" "generated.html" // file-level report

更多信息请参见:http://reportunit.relevantcodes.com

ReportUnit is not maintained and is being replaced by extentreports-dotnet-cli.


You can also try ReportUnit, which also supports Gallio, xUnit, TestNG and MSTest: http://reportunit.relevantcodes.com

This is a simple exe file that will convert your xml report into an HTML dashboards (samples):

Usage:

reportunit "path-to-folder" // folder-level report
reportunit "path-to-folder" "output-folder" // folder-level report
reportunit "Result.xml" "generated.html" // file-level report

More info here: http://reportunit.relevantcodes.com

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文