nunit3如何在命令行中包含测试类别

时间:2015-12-05 10:37:20

标签: nunit

nunit3-console TestData.dll /include:SmokeTests

但是对于nunit v3,我回来了:

Invalid argument: /include:SmokeTests

我尝试在这里检查命令行参数 http://nunit.org/index.php?p=consoleCommandLine&r=3.0

但页面不存在。有人知道发生了什么变化吗?

3 个答案:

答案 0 :(得分:25)

所以如果有人在NUNIT3中搜索如何做到这一点:

 --where "cat == SmokeTests" --noresult

由@ omer727链接帮助!

答案 1 :(得分:6)

@ omer727提供的链接已损坏,这是另一个:https://github.com/nunit/docs/wiki/Console-Command-Line

anwser仍然有效:

>>> hash((1, 2, 3))
2528502973977326415
>>> hash([1, 2, 3])
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
TypeError: unhashable type: 'list'

控制台命令行允许您指定过滤器,该过滤器将选择执行哪些测试。这是使用--where选项完成的,后跟NUnit的测试选择语言(TSL)中的表达式,这是一种为此目的而设计的简单的特定于域的语言。

示例:

s = set(map(tuple, X2))

有关详细信息,请访问此链接:https://github.com/nunit/docs/wiki/Test-Selection-Language

答案 2 :(得分:0)

我正在使用nUnit 3.4和

--where "cat != blah"

没用。我不得不添加冒号

--where:"cat != blah"

从powershell运行命令。

相关问题