I want to run cucumber feature file from java code.
currently we are running form 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 {
}
I don't want to use this instead I want to run this using java program because I want to pass tags at run time from command line or jenkins.
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…