我看到了 NUnit 2.x 版本的几个解决方案。例如,我可以创建 XSLT,或者使用 Allure Reporter。
但是我如何才能为NUnit 3.x版本做到这一点(无需为 NUnit XML 结果编写我自己的 XSLT)?
Allure 不适用于 NUnit3。
我建议使用GHPReporter。您可以为 NUnit 3、SpecFlow 和 MSTest 创建报告。
NUnit 3 不需要其他属性。只需设置插件(请参阅 README 文件中的简短说明:https ://github.com/GHPReporter/Ghpr.NUnit )并使用 NUnit3 控制台运行测试。
在 Firefox 中本地查看您的报告:
about:config
security.fileuri.strict_origin_policy
参数false
在 Chrome 中本地查看您的报告:
--allow-file-access-from-files
:例如C:\PATH TO\chrome.exe --allow-file-access-from-files
另请参阅此处的演示报告
已编辑
NUnitGo不再维护。