我有一个如下所示的功能文件:
Feature: This is a sample feature file
@tag1
Scenario: This is a scenario one.
Given scenario one
When @tag1
Then execute @tag1
@tag2
Scenario: This is a scenario two.
Given scenario two
When @tag2
Then execute @tag2
@tag3
Scenario: This is a scenario three.
Given scenario three
When @tag3
Then execute @tag3
@tag2 @tag3
Scenario: This is a scenario two and three.
Given scenario two and three
When @tag2 @tag3
Then execute @tag2 @tag3
现在我只需要@tag1
和@tag2 @tag3
不要运行单@tag2
和单@tag3
代码
那么我怎样才能提到@CucumberOptions
上的标记,只有@tag1
和@tag2 @tag3
方案将运行其他标记才能运行。
答案 0 :(得分:0)
制作一个新标签来代表2和3的组合,例如@tag2and3
。