Question

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?

Was it helpful?

Solution

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.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top