当我提交一个功能文件时,它工作得很好。我想将具有多个功能文件的功能文件夹路径传递到运行器脚本中。谁能帮忙执行多个特征文件?
所有特征文件的步骤相同,但数据不同,文件名不同。
@RunWith(Cucumber.class)
@CucumberOptions(format = {"pretty"}, features =
"C:\\TESTER\\Execution\\uidata\\featurefiles\\",
glue={"com.test.auto.stepdefs"},dryRun=false)
public class CucumberTest {
}
感谢您的帮助。
最佳答案
功能路径必须相对于您的项目类路径。例如,它看起来像这样:
@CucumberOptions(features = {"classpath:features_folder1", "classpath:features_folder2"}, ...)
或
@CucumberOptions(features="src/test/resources")
关于java - 执行多个 cucumber 特征文件,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/38984295/