当我跑的时候
nunit3-console.exe (myfilepath)\dll fileConsole Runner运行我的所有测试。
我需要运行什么命令才能运行单独的测试?我试过了
nunit3-console.exe /run:namespace.class.method (myfilepath)\dll file它说我使用了一个无效的参数。有人能给我提供正确的语法吗?
谢谢
发布于 2016-05-18 20:22:08
您希望查看--where command line option来运行单独的测试或过滤测试。这是SQL3的新特性。--where选项使用test selection language进行测试,这有点像NUnit。
nunit-console --where "method =~ /Source.*Test/ && class =~ 'My.Namespace.Classname'" test.dll对于简单的筛选器,您还可以将--test=NAMES选项与用逗号分隔的测试名称的简单列表一起使用。
nunit3-console.exe --test=namespace.class.method test.dll对于TestCase和其他数据驱动测试,单个测试的测试名称可能很难确定。如果是这种情况,您可以使用--explore选项。
https://stackoverflow.com/questions/37297838
复制相似问题