Java Cucumber中的Rerun.txt指的是类路径,而不是功能文件夹
我正在运行Cucumber测试(在Jenkins中使用Maven),并根据以下说明将失败的场景输出到target/rerun.txt: 它创建rerun.txt并输入失败的场景,但将它们输入为:features/name.feature:2。然后,重新运行会尝试将它们作为classpath/name.feature运行,但无法看到它们位于src/test/resources/features中 如果我把特性文件放在类路径中,我会得到一个不一致的过滤器错误(可能是因为我在第一次调用中使用了标记,在第二次调用中使用了文本) 如何让Cucumber输出功能的正确路径,或者让它根据rerun.txt查找功能 错误: 正在运行com.xxx.cucumber.\u RunCukesTestJava Cucumber中的Rerun.txt指的是类路径,而不是功能文件夹,java,maven,jenkins,cucumber,Java,Maven,Jenkins,Cucumber,我正在运行Cucumber测试(在Jenkins中使用Maven),并根据以下说明将失败的场景输出到target/rerun.txt: 它创建rerun.txt并输入失败的场景,但将它们输入为:features/name.feature:2。然后,重新运行会尝试将它们作为classpath/name.feature运行,但无法看到它们位于src/test/resources/features中 如果我把特性文件放在类路径中,我会得到一个不一致的过滤器错误(可能是因为我在第一次调用中使用了标记,在
测试运行:1,失败:0,错误:1,跳过:0,经过的时间:0.002秒将第一个测试运行程序的功能文件位置更改为
features=“。”
这将使用功能文件的正确路径更新“rerun.txt”
@RunWith(Cucumber.class)
@CucumberOptions(
strict = false,
features={"src/test/resources/features/"},
snippets=SnippetType.CAMELCASE,
plugin = { "pretty", "json:target/cucumber-reports/test-report.json", "html:target/cucumber-reports",
"rerun:target/rerun.txt"})
public class RunCukesTest {
}
@RunWith(Cucumber.class)
@CucumberOptions(
strict = false,
features={"@target/rerun.txt"},
snippets=SnippetType.CAMELCASE,
plugin = {"pretty", "json:target/cucumber-reports/test-report.json", "html:target/cucumber-reports"})
public class _RunCukesTest {
}