gpt4 book ai didi

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

转载 作者:行者123 更新时间:2023-12-01 08:24:01 25 4
gpt4 key购买 nike

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

但是我该怎么做 NUnit 3.x 版本(无需为 NUnit XML 结果编写我自己的 XSLT)?

Allure 不适用于 NUnit3。

最佳答案

我建议使用 GHPReporter .
您可以为 NUnit 3、SpecFlow 和 MSTest 创建报告。

NUnit 3 不需要其他属性。只需设置插件(请参阅自述文件中的简短说明: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

    已编辑

    NUnitGo不再维护。

    关于nunit - 有没有办法为 NUnit3 创建 HTML 报告?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/35219661/

    25 4 0
    Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
    广告合作:1813099741@qq.com 6ren.com