This PR adds support for scenario outlines. A number of people have asked about this capability, so we thought we'd implement it.
Each Example record in a ScenarioOutline is expanded during normalisation and evaluated as aScenario during execution. Scenario outlines are evaluated inline where declared but can also be annotated as @StepDefs if deferred execution is required (this makes them callable from anywhere and executable in the REPL also).
You can download the following SNAPSHOT to have a play
Feature: Join Strings
Scenario Outline: Joining <string 1> and <string 2> should yield <result>
This scenario is evaluated at the point where the outline is declared.
Joining <string 1> and <string 2> should yield <result>
Given string 1 is "<string 1>"
And string 2 is "<string 2>"
When I join the two strings
Then the result should be "<result>"
Examples: Basic string concatenation
The header row contains the placeholder names. The body rows that
follow contain the data that is bound to each scenario that is evaluated.
| string 1 | string 2 | result |
| howdy | doo | howdydoo |
| any | thing | anything |
Scenario: Verify that we can join two strings together
Given I join two strings together
Meta file:
Feature: Join Strings Meta
@StepDef
Scenario: I join the two strings
Given the result is "${string 1}${string 2}"
Report:
Each example record in the report is a hyperlink that when clicked opens up the linked scenario.
This PR adds support for scenario outlines. A number of people have asked about this capability, so we thought we'd implement it.
Each Example record in a
ScenarioOutline
is expanded during normalisation and evaluated as aScenario
during execution. Scenario outlines are evaluated inline where declared but can also be annotated as@StepDef
s if deferred execution is required (this makes them callable from anywhere and executable in the REPL also).You can download the following SNAPSHOT to have a play
Sample Use
Meta file:
Report:
Each example record in the report is a hyperlink that when clicked opens up the linked scenario.