我看到了 NUnit 2.x 版本的几种解决方案。例如,我可以创建 XSLT,或使用 Allure Reporter。
但我该怎么做呢NUnit 3.x版本(无需为 NUnit XML 结果编写我自己的 XSLT)?
Allure 不适用于 NUnit3。
我建议使用地源热泵报告者 https://github.com/GHPReporter。
您可以为 NUnit 3、SpecFlow 和 MSTest 创建报告。
NUnit 3 不需要其他属性。只需设置插件(请参阅 README 文件中的简短说明:https://github.com/GHPReporter/Ghpr.NUnit https://github.com/GHPReporter/Ghpr.NUnit)并使用 NUnit3 Console 运行测试。
在 Firefox 中本地查看您的报告:
- Go to
about:config
- Find
security.fileuri.strict_origin_policy
范围
- 将其设置为
false
在 Chrome 中本地查看您的报告:
- 关闭 Chrome(所有实例)
- 启动它
--allow-file-access-from-files
选项:
例如C:\PATH TO\chrome.exe --allow-file-access-from-files
另请参阅演示报告here https://ghpreporter.github.io/
EDITED
NUnitGo https://github.com/elv1s42/NUnitGo不再维护。
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)