2

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?

TDub
  • 23
  • 5
gad_gadskiy
  • 160
  • 1
  • 11
  • That sort of thing is not easily accomplished with annotations, and would be one hell of a hack if it did. I highly doubtful any library has that sort of functionality – Stav Saad Nov 01 '17 at 09:43
  • No, this is not possible. Please see [this issue](https://github.com/getgauge/gauge/issues/728) for related disucssion – Srikanth Venugopalan Nov 04 '17 at 08:13

0 Answers0