In my feature file, IntelliSense says that there is a keyword called Scenarios
. Note that it is plural. I've poured through the documentation and can't find any references to it. Can anybody explain what it is for and how it can be used?
If different groups need different backgrounds, and it's not possible to just use scenario outlines to group them, then perhaps split the specification into multiple feature files. Each file will be shorter, and it can use a more focused background section to prepare only the common aspects for its own scenarios.
Scenario outline is exactly similar to the scenario structure, but the only difference is the provision of multiple inputs. In order to use scenario outlines, we do not need any smart idea, we just need to copy the same steps and re-execute the code.
That's a synonym to the Examples word used in for different Scenarios using the Scenario Outline construct... Or in plain English; if you use a Scenario Outline you can list the different examples under the keyword "Examples", or under the keyword "Scenarios".
Here is an example:
Scenario Outline: eating
Given there are <start> cucumbers
When I eat <eat> cucumbers
Then I should have <left> cucumbers
Scenarios:
| start | eat | left |
| 12 | 5 | 7 |
| 20 | 5 | 15 |
I didn't know that before but it's easy to spot by looking in the language file. Here you'll find all the words in the all the supported languages.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With