nunit3 如何在命令行中包含测试类别
nunit3 how to include test category in command line
nunit3-console TestData.dll /include:SmokeTests
但是使用 nunit v3 我回来了:
Invalid argument: /include:SmokeTests
我在这里尝试检查命令行参数
http://nunit.org/index.php?p=consoleCommandLine&r=3.0
但是页面不存在。有人知道发生了什么变化吗?
因此,如果有人正在搜索如何在 NUNIT3 中执行此操作:
--where "cat == SmokeTests" --noresult
在@omer727 的帮助下 link!
@omer727 提供的 Link 已损坏,这是另一个:https://github.com/nunit/docs/wiki/Console-Command-Line
答案仍然有效:
--where "cat == SmokeTests"
控制台命令行允许您指定一个过滤器,它将 select 执行哪些测试。这是使用 --where 选项完成的,后跟 NUnit 的测试选择语言 (TSL) 中的表达式,这是一种为此目的而设计的简单的特定于域的语言。
示例:
nunit3-console mytest.dll --where "cat == Urgent || Priority == High"
有关详细信息,请访问此 link:https://github.com/nunit/docs/wiki/Test-Selection-Language
编辑:
详细的例子可以在相关的SO问题中找到here。
我正在使用 nUnit 3.4,
--where "cat != blah"
没用。我不得不添加冒号
--where:"cat != blah"
是 运行 来自 powershell 的命令。
nunit3-console TestData.dll /include:SmokeTests
但是使用 nunit v3 我回来了:
Invalid argument: /include:SmokeTests
我在这里尝试检查命令行参数 http://nunit.org/index.php?p=consoleCommandLine&r=3.0
但是页面不存在。有人知道发生了什么变化吗?
因此,如果有人正在搜索如何在 NUNIT3 中执行此操作:
--where "cat == SmokeTests" --noresult
在@omer727 的帮助下 link!
Link 已损坏,这是另一个:https://github.com/nunit/docs/wiki/Console-Command-Line
答案仍然有效:
--where "cat == SmokeTests"
控制台命令行允许您指定一个过滤器,它将 select 执行哪些测试。这是使用 --where 选项完成的,后跟 NUnit 的测试选择语言 (TSL) 中的表达式,这是一种为此目的而设计的简单的特定于域的语言。
示例:
nunit3-console mytest.dll --where "cat == Urgent || Priority == High"
有关详细信息,请访问此 link:https://github.com/nunit/docs/wiki/Test-Selection-Language
编辑:
详细的例子可以在相关的SO问题中找到here。
我正在使用 nUnit 3.4,
--where "cat != blah"
没用。我不得不添加冒号
--where:"cat != blah"
是 运行 来自 powershell 的命令。