在Java中运行Cucumber时修改CucumberOptions标记

在Java中运行Cucumber时修改CucumberOptions标记,java,bdd,cucumber-java,Java,Bdd,Cucumber Java,我想知道在Cucumber运行时是否有方法修改CucumberOptions标记 我不确定这是否可行,但我想知道是否有办法在Cucumber运行时修改标记。在我的示例代码中,我想在cumber运行后添加另一个标记“@Login”。我正在尝试设置一个配置,在该配置中,我可以选择要运行的功能,而无需进入Runner类 设置类 String AddTags = "@Login"; set = new HashMap<String, String>(){

我想知道在Cucumber运行时是否有方法修改CucumberOptions标记

我不确定这是否可行,但我想知道是否有办法在Cucumber运行时修改标记。在我的示例代码中,我想在cumber运行后添加另一个标记“@Login”。我正在尝试设置一个配置,在该配置中,我可以选择要运行的功能,而无需进入Runner类

设置类

 String AddTags = "@Login";
          set = new HashMap<String, String>(){
            {put("Tags", AddTags);

不确定Cucumber是否可以这样做,但想问一下。

使用标签列表怎么样

tags = "@Smoke,@Login"
可以使用组合多个标记,例如:

**Expression        Description**
@fast               Scenarios tagged with @fast
@wip and not @slow  Scenarios tagged with @wip that aren’t also tagged with @slow
@smoke and @fast    Scenarios tagged with both @smoke and @fast
@gui or @database   Scenarios tagged with either @gui or @database

一旦触发了runner,就无法在运行时更改标记。你能详述你正在努力实现的目标吗?
**Expression        Description**
@fast               Scenarios tagged with @fast
@wip and not @slow  Scenarios tagged with @wip that aren’t also tagged with @slow
@smoke and @fast    Scenarios tagged with both @smoke and @fast
@gui or @database   Scenarios tagged with either @gui or @database