【问题标题】:Adjust test name in NUnit在 NUnit 中调整测试名称
【发布时间】:2020-02-05 11:01:33
【问题描述】:

我们针对不同的配置运行了两次测试套件。我们的 CI 服务器将它们聚合成一个无法正常工作的报告,因为所有测试名称在 NUnit 报告文件中都存在两次。

有没有办法调整所有测试名称,例如,根据配置值添加前缀。或者换句话说:是否可以为所有测试名称动态添加前缀(例如,在 SetUpFixture 或类似的东西中)。

【问题讨论】:

    标签: nunit nunit-3.0


    【解决方案1】:

    啊,找到了。控制台运行器有一个选项:

    --test-name-format="MyPrefix_{m}{a}"

    请参阅https://github.com/nunit/docs/wiki/Console-Command-Linehttps://github.com/nunit/docs/wiki/Template-Based-Test-Naming 了解更多信息。

    【讨论】:

    猜你喜欢
    • 2014-12-10
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2012-04-01
    • 1970-01-01
    • 2013-03-20
    相关资源
    最近更新 更多