You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+23-1Lines changed: 23 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -71,7 +71,7 @@ Feature: Counter
71
71
ThenI see {'1'} text
72
72
```
73
73
74
-
`Backround` and `After`keywords are optional. A `Background` allows you to add some context to the scenarios that follow it. It can contain one or more Given steps, which are run before each scenario. An `After` scenarion run even if a test fails, to ensure that it has a chance to clean up after itself. Most probably you don't need to use this keyword.
74
+
`Backround` and `After`sections are optional. A `Background` allows you to add some context to the scenarios that follow it. It can contain one or more Given steps, which are run before each scenario. An `After` scenarion run even if a test fails, to ensure that it has a chance to clean up after itself. Most probably you don't need to use this keyword.
75
75
76
76
Each feature file must have one or more `Feature:`s. Features become test groups in Flutter tests.
77
77
@@ -80,6 +80,28 @@ Each feature group must have one or more `Scenario:`s (or `Example:`s). Scenario
80
80
Each scenario must have one or more lines with steps. Each of them must start with `Given`, `When`, `Then`, `And`, or `But` keywords. Conventionally `Given` steps are used for test arrangements, `When` — for interaction, `Then` — for asserts. Keywords are not taken into account when looking for a step definition.
81
81
You can have as many steps as you like, but it's recommended you keep the number at 3-5 per scenario. Having too many steps will cause it to lose it’s expressive power as specification and documentation.
82
82
83
+
The `Scenario Outline` keyword can be used to run the same `Scenario` multiple times, with different combinations of values.
84
+
85
+
A Scenario Outline must contain an `Examples` (or `Scenarios`) section. Its steps are interpreted as a template which is never directly run. Instead, the Scenario Outline is run once for each row in the Examples section beneath it (not counting the first header row).
86
+
87
+
The steps can use `<>` delimited parameters that reference headers in the examples table. The plugin will replace these parameters with values from the table before it tries to match the step against a step definition.
88
+
89
+
Scenario Outline example:
90
+
```ruby
91
+
Feature:Sample
92
+
93
+
ScenarioOutline:Plus button increases the counter
94
+
Given the app is running
95
+
WhenI tap {Icons.add} icon <times> times
96
+
ThenI see <result> text
97
+
98
+
Examples:
99
+
| times | result |
100
+
|0|'0'|
101
+
|1|'1'|
102
+
|42|'42'|
103
+
```
104
+
83
105
## Predefined steps
84
106
85
107
This library comes with a list of predefined steps. They will be auto-generated for you, but you may want to adjust their implementation according to your needs.
0 commit comments