@before.each_example or @before.each_row

39 views
Skip to first unread message

Suchit Parikh

unread,
Aug 13, 2013, 7:06:39 PM8/13/13
to lettuc...@googlegroups.com
I have scenarios with a few rows of examples

e.g.

Scenario: My scenario
  Given My pre requirements
  When I do something passing <parameter>
  Then I verify my test passes
  Examples:
    | parameter |
    | param1     |
    | param2     |

I know that @before.each_scenario will be executed before each scenario is run.  But if I want to run a method before a scenario is executed for each row of examples, is there any support for that in lettuce or is there any other way that people deal with this?
  

Chris Mead

unread,
Jan 21, 2014, 3:25:46 PM1/21/14
to lettuc...@googlegroups.com
Looks like you will find what you need here:

 
  

Michel Sabchuk

unread,
Jul 1, 2014, 12:39:47 PM7/1/14
to lettuc...@googlegroups.com
Note that before.each_scenario e after.each_scenario are supposed to run for each outline too but it is buggy. I did a fix to the bug but I think lettuce authors are waiting the 3.0 release (that, as far as i understand, also fixes it):

https://github.com/gabrielfalcao/lettuce/issues/261
Reply all
Reply to author
Forward
0 new messages