有没有办法为NUnit3创建HTML报告?

时间:2016-02-05 08:40:22

标签: nunit nunit-3.0

我看到了NUnit 2.x版本的几种解决方案。例如,我可以创建XSLT,或使用Allure Reporter。

但是我如何才能为 NUnit 3.x 版本(没有为NUnit XML结果编写自己的XSLT)?

Allure不适用于NUnit3。

1 个答案:

答案 0 :(得分:5)

我建议使用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中本地查看您的报告:

  • 关闭Chrome(所有实例)
  • 使用--allow-file-access-from-files选项启动它: 例如C:\PATH TO\chrome.exe --allow-file-access-from-files

另见演示报告here

<强> EDITED

NUnitGo已不再维护。