Anil Gollaa
2009-May-18 15:36 UTC
[rspec-users] Skipping the testscenario based on Given block execution.
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. Please help me in this regard -- Posted via http://www.ruby-forum.com/.
Lee Hambley
2009-May-18 18:43 UTC
[rspec-users] Skipping the testscenario based on Given block execution.
Anil, Your precondition shouldn''t fail? - Lee 2009/5/18 Anil Gollaa <lists at ruby-forum.com>> > 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. > > Please help me in this regard > -- > Posted via http://www.ruby-forum.com/. > _______________________________________________ > rspec-users mailing list > rspec-users at rubyforge.org > http://rubyforge.org/mailman/listinfo/rspec-users >-------------- next part -------------- An HTML attachment was scrubbed... URL: <http://rubyforge.org/pipermail/rspec-users/attachments/20090518/a606a232/attachment.html>
Anil Gollaa
2009-May-19 08:30 UTC
[rspec-users] Skipping the testscenario based on Given block execution.
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. Thanks, Anil -- Posted via http://www.ruby-forum.com/.
Joseph Wilk
2009-May-19 09:42 UTC
[rspec-users] Skipping the testscenario based on Given block execution.
Anil Gollaa wrote:> 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. HTHs -- Joseph Wilk http://blog.josephwilk.net> Thanks, > Anil >
aslak hellesoy
2009-May-19 09:48 UTC
[rspec-users] Skipping the testscenario based on Given block execution.
> 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. >The intention is that when a Before block raises an error, the steps of the scenario are skipped. However, this isn''t working properly, but a fix is in progress: https://rspec.lighthouseapp.com/projects/16211/tickets/330-gracefully-handle-exceptions-in-after-block For new threads, please use the Cucumber google group: http://groups.google.com/group/cukes Cheers, Aslak> Thanks, > Anil > -- > Posted via http://www.ruby-forum.com/. > _______________________________________________ > rspec-users mailing list > rspec-users at rubyforge.org > http://rubyforge.org/mailman/listinfo/rspec-users >