Hi,
Generally in cucumber, we write the preconditions in GIVEN block,
Is there any way in cucumber using which test scenario execution is
skipped, based on the Given block execution.
Because there is no point in executing the test scenario when
precondition itself fails.
Hi,
I think i am not clear.
My query is while running the testcases,
Some times precondition of testcase fails, when precondition itself
fails there is no point in executing the testcase further.
so , is there any way in cucumber to skip execution of scenario when
precondition of testcase fails.
Hi,
I think i am not clear.
My query is while running the testcases,
Some times precondition of testcase fails, when precondition itself
fails there is no point in executing the testcase further.
so , is there any way in cucumber to skip execution of scenario when
precondition of testcase fails.
In a Scenario if any step fails the following steps of that scenario
are skipped.
This is the current behaviour of Cucumber. Older versions of Cucumber
had some trouble with properly skipping these steps.
Hi,
I think i am not clear.
My query is while running the testcases,
Some times precondition of testcase fails, when precondition itself
fails there is no point in executing the testcase further.
so , is there any way in cucumber to skip execution of scenario when
precondition of testcase fails.
This seems like a really bad practice when writing tests, and I’m having
trouble imagining a situation where this would be justified.
If “sometimes the precondition fails” that means on each test run you
won’t know whether the test actually ran or not, and thus whether the
test succeeds or fails.
Seems to me this really needs 2 examples: 1 for when the precondition
succeeds, 1 for when it fails. What is the source of this
precondition? Sounds like that needs to be stubbed or mocked.
As always, I would be happy for others to set me back on track…
Thanks,
dwh
This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.