Search code examples
getgauge

Gauge test run : skip subsequent scenarios if one scenario fails in a spec file


With gauge run specs, it runs all scenarios even if any fails- that works in most of the cases, however, I need a spec execution to stop if it fails on any scenario. For example, a spec has the following scenarios A B C if A fails it should not execute B, C and mark the spec as fail.


Solution

  • Gauge encourage scenarios to be independent of each other. If scenario A is failed it should not break the execution of scenario B and C. Read the Gauge FAQ why-we-cannot-skip-all-tests-dynamically-during-a-gauge-run-if-there-is-a-test-failure