I'm trying to find way to skip Gauge execution dynamically (with ignoring all next steps but without failing). For example I have some spec
Before test
===========================================================
* Before step
Scenario
-----------------------------------------------------------
* Step 1
* Step 2
And their implementation
@Step("Step 1")
public void step1() {
if (ignoreCondition) {
//how to skip test??????
} else {
doSomething();
}
}
//if ignoreCondition==true this step must be ignored
@Step("Step 2")
public void step2() {
doSomethingElse();
}
Is there any way to do like this?