有没有办法通过NUnit.ConsoleRunner.3.9.0执行多类别标记

有没有办法通过NUnit.ConsoleRunner.3.9.0执行多类别标记,nunit,categories,bdd,specflow,Nunit,Categories,Bdd,Specflow,我可以成功地执行单个测试类别标记(例如:——其中“cat=sanity”) 但是,我需要通过NUnit.ConsoleRunner.3.9.0执行多个“cat”标记 e、 g:类似于——其中“cat=sanity”和“cat=smoke”同时出现。您可以使用“or”符号来执行此操作,例如 nunit3-console mytests.dll --where "cat=sanity || cat=smoke" 有关可能的操作的更多详细信息,请参阅。您可以使用“或”符号来执行此操作,例如 nuni

我可以成功地执行单个测试类别标记(例如:
——其中“cat=sanity”

但是,我需要通过NUnit.ConsoleRunner.3.9.0执行多个“cat”标记


e、 g:类似于
——其中“cat=sanity”和
“cat=smoke”同时出现。

您可以使用“or”符号来执行此操作,例如

nunit3-console mytests.dll --where "cat=sanity || cat=smoke"

有关可能的操作的更多详细信息,请参阅。

您可以使用“或”符号来执行此操作,例如

nunit3-console mytests.dll --where "cat=sanity || cat=smoke"

请参阅以了解更多可能的细节。

正是引号的位置让您感到困惑。
——其中
选项后面跟着三个参数,而不是一个

所以,如果你真的想要“和”,这些都会起作用

--where "cat=sanity and cat=smoke"
--where "cat=sanity && cat=smoke"
--where "cat=sanity & cat=smoke"
然而,正如Chris所暗示的,您最有可能的意思是“或”而不是“和”。上面的测试将只运行两个类别的测试。如果你想要其中任何一个,那么任何一个都可以

--where "cat=sanity or cat=smoke"
--where "cat=sanity || cat=smoke"
--where "cat=sanity | cat=smoke"

是引号的位置把你搞砸了。
——其中
选项后面跟着三个参数,而不是一个

所以,如果你真的想要“和”,这些都会起作用

--where "cat=sanity and cat=smoke"
--where "cat=sanity && cat=smoke"
--where "cat=sanity & cat=smoke"
然而,正如Chris所暗示的,您最有可能的意思是“或”而不是“和”。上面的测试将只运行两个类别的测试。如果你想要其中任何一个,那么任何一个都可以

--where "cat=sanity or cat=smoke"
--where "cat=sanity || cat=smoke"
--where "cat=sanity | cat=smoke"