Thoughts on interleaved processing Background and Scenario

11 views
Skip to first unread message

Doug Puchalski

unread,
Apr 11, 2014, 5:32:22 PM4/11/14
to ruby-...@googlegroups.com
Per the following feature:

Background:
  Given alpha
  When charlie
  Then echo

Scenario:
  Given bravo
  When delta
  Then foxtrot

Ideally execution order would be alpha, bravo, charlie, delta, echo, foxtrot.

i.e. the background gets executed entirely before the scenario. Would it make sense to instead run each section of background before each section of scenario? This would really help DRY up some of my specs.


Jonas Nicklas

unread,
Apr 14, 2014, 7:26:59 AM4/14/14
to ruby-...@googlegroups.com
Philosophical issues aside, given the current implementation of the Gherkin parser, this is actually pretty much impossible to implement, because the parser does not separate steps by their keyword. I guess since they don't need it in Cucumber, they didn't add it to the AST.

/Jonas


--
You received this message because you are subscribed to the Google Groups "Turnip" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ruby-turnip...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply all
Reply to author
Forward
0 new messages