I am using RuntimeHooks for customisation, here for boolean beforeScenario(ScenarioRuntime sr) ,i am passing false as return value. But scenario is running without ignoring. Expected is to skip the scenario and move to next scenario.
public class CustomHook implements RuntimeHook{
@Override
public boolean beforeScenario(ScenarioRuntime sr) {
System.out.println(sr.scenario.getName());
boolean skip ;
System.out.println(sr.caller.isNone());
if(sr.scenario.getName().contains("skip")) {
skip=false;
}
else {
skip=true;
}
return skip;
}