gpt4 book ai didi

unit-testing - 将vstest.console.exe TestCategory与等号和不等号一起使用

转载 作者:行者123 更新时间:2023-12-04 03:02:58 24 4
gpt4 key购买 nike

我正在使用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”

有任何想法吗?

最佳答案

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

2)我需要用括号将整个条件括起来,例如:

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

关于unit-testing - 将vstest.console.exe TestCategory与等号和不等号一起使用,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/38139803/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com