麻烦让黄瓜重新运行插件通过终端工作

1ak*_*sha 6 java cucumber maven cucumber-jvm

我正在使用用java编写的用于ui测试的黄瓜.我正在尝试实现黄瓜插件来重新运行失败的场景,并创建了第二个类作为这些场景的跑步者:

头等舱

@RunWith(Cucumber.class)
@CucumberOptions(
        monochrome = true,
        strict = true,
        tags = {"@lakeisha"},
        features = ".",
        format = {"html:target/cucumber", "json:target/cucumber.json"},
        plugin = {
                "pretty", "html:target/cucumber-reports",
                "json:target/cucumber.json",
                "rerun:src/test/resources/rerun.txt" //Creates a text file with failed scenarios
        })
public class RunCukeTestsIT extends BaseCucumberRunner {
}
Run Code Online (Sandbox Code Playgroud)

第二课:

@RunWith(Cucumber.class)
@CucumberOptions(
        monochrome = true,
        tags = {"@lakeisha"},
        features = "@src/test/resources/rerun.txt", //Cucumber picks the failed scenarios from this file
        format = {"html:target/cucumber", "json:target/cucumber.json"}
)
public class ReRunCukeTestsIT extends BaseCucumberRunner{

}
Run Code Online (Sandbox Code Playgroud)

我正在使用测试

mvn clean verify -Dcucumber.options=" --tags @lakeisha"
Run Code Online (Sandbox Code Playgroud)

问题是通过终端运行它似乎没有在rerun.txt中生成任何内容,但是通过IJ运行它.我也尝试将插件放入命令的Dcucumber.options部分,但无济于事.非常感谢!