I am writing tests using cucumber-jvm and I want the system to stop running tests on the first scenario that fails. I found example code written for Cucumber Ruby that does thi
The accepted answer for cucumber-jvm quit on first test failure using
throw new IllegalStateException()
doesn't work in my experience.
Try the cucumber command line switch -y
instead.
I didn't find any hard documentation for -y
, but it was suggested here and a developer in that conversation committed to implementing it. I've tested it and it works as expected.
I have not found a cucumber-jvm version of Cucumber.wants_to_quit?
but perhaps this will cover your use case.