Hi!I have several steps that use data from Examples sectioni.e.:(my actual scenario is different)Scenario Outline: Log inWhen I enter "<Username>"And I enter "<Password>"Then I see "<Message>"Examples:|Username|Password|Message||aaaaaaaa|bbbbbbbb|OK Â Â Â Â Â |I want to make a step: "I log in" ,that will have nested steps like that:When /^I log in$/ dosteps %Q{When I enter "<Username>"And I enter "<Password>"Then I see "<Message>"}end
--
Scenario Outline: Log inWhen I log inExamples:|Username|Password|Message||aaaaaaaa|bbbbbbbb|OK Â Â Â Â Â |But when i do that, the data from Examples section is not being passed.Is there a way to do that?Thanks!
Posting rules: http://cukes.info/posting-rules.html
---
You received this message because you are subscribed to the Google Groups "Cukes" group.
To unsubscribe from this group and stop receiving emails from it, send an email to cukes+un...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Hi!
I have several steps that use data from Examples sectioni.e.:(my actual scenario is different)Scenario Outline: Log inWhen I enter "<Username>"And I enter "<Password>"Then I see "<Message>"Examples:|Username|Password|Message||aaaaaaaa|bbbbbbbb|OK Â Â Â Â Â |I want to make a step: "I log in" ,that will have nested steps like that:When /^I log in$/ dosteps %Q{When I enter "<Username>"And I enter "<Password>"Then I see "<Message>"}end
Scenario Outline: Log in
When I log inExamples:|Username|Password|Message||aaaaaaaa|bbbbbbbb|OK Â Â Â Â Â |
But when i do that, the data from Examples section is not being passed.Is there a way to do that?Thanks!
--
Posting rules: http://cukes.info/posting-rules.html
---
You received this message because you are subscribed to the Google Groups "Cukes" group.
To unsubscribe from this group and stop receiving emails from it, send an email to cukes+un...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
The reason I need it, is that I use those steps as steps on their own in other features.And definitions are already written for them.So i just want to reuse them for some specific scenarios.I actually did it another way:Scenario Outline: Log inWhen I log in, "<Username>", "<Password>", "<Message>"
Examples:|Username|Password|Message||aaaaaaaa|bbbbbbbb|OK Â Â Â Â Â |
and definitionWhen /^I log in, "([^\"]*)", "([^\"]*)", "([^\"]*)"$/ do |x,y,z|steps %Q {I enter "#{x}"I enter "#{y}"I see "#{z}"}end
--
Posting rules: http://cukes.info/posting-rules.html
---
You received this message because you are subscribed to the Google Groups "Cukes" group.
To unsubscribe from this group and stop receiving emails from it, send an email to cukes+un...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
I wonder if the underlying issue here is that some people don't know how to reuse code using regular methods.TBH I would like to remove the "calling steps from steps" feature completely from all Cucumber implementations and replace that with a blog post and/or documentation explaining how to use methods/functions to reuse code.WDYT?
On Tue, Jan 5, 2016 at 8:57 AM, aslak hellesoy <aslak.h...@gmail.com> wrote:I wonder if the underlying issue here is that some people don't know how to reuse code using regular methods.TBH I would like to remove the "calling steps from steps" feature completely from all Cucumber implementations and replace that with a blog post and/or documentation explaining how to use methods/functions to reuse code.WDYT?Rather than removing it, could you give a warning with a link to that documentation? I suspect many people have quite a bit of this in their step definitions, and removing it would be pretty disruptive. You don't want your whole test suite breaking on an upgrade.