我想从 java 代码运行黄瓜功能文件。
目前我们正在运行 JUnit Runner
package com.compareglobalgroup.testscript;
import cucumber.api.CucumberOptions;
import cucumber.api.testng.AbstractTestNGCucumberTests;
@CucumberOptions(features = { "src/test/resources/feature/BB" }, glue = { "com.compareglobalgroup.stepdefs.BB",
"com.compareglobalgroup.cucumber.hooks" }, plugin = {
"json:cucumberreport/json/cucumberreport.json" }, tags = { ""
+ "@Test" })
public class TestRunnerBB extends AbstractTestNGCucumberTests {
}
我不想使用它,而是想使用 java 程序运行它,因为我想在运行时从命令行或 jenkins 传递标签。