gpt4 book ai didi

java - 如何在 Cucumber-JVM 中实现 AND OR 关系

转载 作者:行者123 更新时间:2023-12-02 08:58:16 25 4
gpt4 key购买 nike

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

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 场景才会运行,其他场景不会运行运行。

最佳答案

创建一个新标签来表示 2 和 3 的组合,例如@tag2and3

关于java - 如何在 Cucumber-JVM 中实现 AND OR 关系,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/34766015/

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