【发布时间】:2018-09-03 19:29:33
【问题描述】:
我正在尝试在命令行上运行我的 SpecFlow/xUnit 测试,如下所述:
http://gasparnagy.com/2016/02/running-specflow-scenarios-in-parallel-with-xunit-v2/
如果我输入这个:
.\packages\xunit.runner.console.2.3.1\tools\net452\xunit.console.exe --help
描述的标志之一是:
-trait "name=value" : only run tests with matching name/value traits
: if specified more than once, acts as an OR operation
我有一个带有 @justthisone 特征的 SpecFlow 场景,我想自己运行它。 Visual Studio 测试资源管理器将此列为具有 Category [justthisone] 的特征我已经尝试过:
.\packages\xunit.runner.console.2.3.1\tools\net452\xunit.console.exe .\MyProj.Tests\bin\Debug\MyProj.Tests.dll -trait "name=justthisone"
但我得到了这个输出:
=== TEST EXECUTION SUMMARY ===
Order.UserInterface.Tests.dll Total: 0
我应该如何编写 -trait 标志/选项来告诉 xUnit 我要运行哪些测试?
【问题讨论】:
标签: command-line automated-tests traits specflow xunit