我们可以使用specflow忽略特定的@tag吗 [英] Can we Ignore particular @tag using specflow
问题描述
我正在使用specflow编写功能文件.我的功能文件包含"@Tags"(例如:@ Authentication,@ Login,@ Permission等),因此我想运行除以外的所有文件@Authentication ..
I am using specflow for writing my feature files .my feature files contains "@Tags"(like:@Authentication,@Login,@Permission,etc...) so i want to run all of them except @Authentication..
所以我们可以使用如下标记: 〜@ Authentication ,因此它将执行除包含@Authentication标记的测试用例之外的所有测试用例
so can we use tag like: ~@Authentication so this will execute all test cases except test case containing @Authentication tag
推荐答案
如上所述,您正在使用MSTest.exe从命令行运行测试,那么您应该能够运行不在类别中的测试(根据命令行选项,如下所示:
As you have stated that you are running the tests from the command line using MSTest.exe then you should be able to run tests that are not in a category (according to the command line options like this:
%VS100COMNTOOLS%.. \ IDE \ MSTest.exe"/testcontainer:"Project.dll"/category:"!Authentication"
"%VS100COMNTOOLS%..\IDE\MSTest.exe" /testcontainer:"Project.dll" /category:"!Authentication"
这篇关于我们可以使用specflow忽略特定的@tag吗的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!