3

我有一个功能文件,如下所示:

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场景将运行的标签,而其他的将不会运行。

4

1 回答 1

0

制作一个新标签来表示 2 和 3 的组合,例如@tag2and3.

于 2016-01-13T11:57:19.770 回答