Defining Examples for Multiple Scenario Outlines

In a project where we are using cucumber-jvm for our websites, I ran into a problem that so far I have failed: Se has several Scenario Outline

that should use the same one Examples

. Now, of course, I can copy these examples into each one, but it would be much shorter (and probably easier to understand) if you could do something like this:

Background:
  Examples:
    | name  |
    | Alice |
    | Bob   |

Scenario Outline: Flying to the conference
  Given I'm flying to a confernce
  When I try to check in at the airport
  And my name is <name>
  Then I should get my plane ticket

Scenario Outline: Collecting the conference ticket
  Given I'm at a conference
  When I ask for the ticket for <name>
  And show my business card to prove my id
  Then I should get my conference ticket

Scenario Outline: Collectiong my personalized swag bag
  Given I'm at a conference
  When I go to the first booth
  And show them my conference ticket with the name <name>
  Then they'll give me a swag bag with the name <name> printed onto it

      

Is this possible? If so, how? I would use some kind of factory as suggested here ? If so, any recommendations?

+3
cucumber cucumber-jvm gherkin


source to share


No one has answered this question yet

See similar questions:

0
Cucumber: How do I use multiple script scripts with one example?

or similar:

12
Sharing a common set of examples across multiple scripting paths in
eleven
Cucumber Scenario and Examples with Common Stage Definitions
3
How do I write a script outline to write a list of objects in one argument?
2
Behave: Writing a Script with Dynamic Examples
1
Cucumber: How to Read Examples from an External Excel File for Scenarios Outline
1
SpecFlow ScenarioOutline "playing" example names
0
Using the script schema and examples with strings
0
Scenario diagram in cucumbers
0
Gerkhin does not recognize examples of script outlines
0
Cucumber script script with special characters



All Articles
Loading...
X
Show
Funny
Dev
Pics