使用vstest.console.exe TestCategory使用equals而不是equals

Sco*_*eep 9 unit-testing specflow vstest

我正在使用SpecFlow为自动UI测试编写Gherkin.我们有多个标签(@ smoke,@ on,@ off等).

测试A有标签@smoke测试B有标签@smoke @off

这些被转换为vstest测试类别,不包括@符号.

我想运行测试A而不是测试B.

这是不起作用的.它运行所有@smoke测试.

Vstest.console.exe mytest.dll/TestCaseFilter:"TestCategory = smoke&TestCategory!= off"

有任何想法吗?

Sco*_*eep 12

我有两个问题.1)我正在使用Thoughtworks Go执行测试,在执行命令之前使用引号做了奇怪的事情

2)我需要用括号括起整个条件:

Vstest.console.exe mytest.dll/TestCaseFilter:"(TestCategory = smoke&TestCategory!= off)"