I need to pass the Cucumber tagname from an external file (run.yml) as below
execution:
tag: '@Regression'
How to pass to runner class. My current runner class is as below and execution doing from meven or directly from junit
@RunWith(Cucumber.class)
@CucumberOptions(
tags = "@Regression" ,
features = "features",
glue = "io/automation/gluecode",
plugin = {"json:target/cucumber.json"}
)
public class TestRunner {
}
I tired to implement with the solution provided here, but it is not working in latest cucumber
RuntimeOptions runtimeOptions = new RuntimeOptions(new ArrayList(Arrays.asList(argv)));
MultiLoader resourceLoader = new MultiLoader(this.getClass().getClassLoader());
ResourceLoaderClassFinder classFinder = new ResourceLoaderClassFinder(resourceLoader, this.getClass().getClassLoader());
Runtime runtime = new Runtime(resourceLoader, classFinder, this.getClass().getClassLoader(), runtimeOptions);
unable to locate MultiLoader
class