我想在Cucumber
下面的注释中的'Features'字段中动态传递Feature File名称@CucumberOptions(
dryRun = false,
strict = true,
features = {
"src/com/Proj/Feature/Dashboard.feature"
},
glue = "com/Proj/StepDefinition",
tags = {},
monochrome = true,
plugin = {
"pretty",
"html:target/site/cucumber-pretty",
"json:target/cucumber.json"
}
)
目前在运行之前我们必须传递功能文件,不想硬编码Dashboard.feature功能文件
答案 0 :(得分:1)
默认情况下,您只会在运行时传递.feature
文件。
运行特定功能文件
> cucumber feature_file_name.feature
运行特定方案
cucumber feature_file_name.feature :(方案行号)
> cucumber feature_file_name.feature:10
在项目中运行整个要素文件
> cucumber