A Scenario Outline with an Examples section containing no data table will end up with the
execution of zero scenario; that is unlikely the expected behavior. Thus, each Examples should contain
a data table.
Scenario Outline: Add product to cart Given I am a customer When I add <number> products to my cart Then I should see <number> products in my cart Examples:
Scenario Outline: Add product to cart
Given I am a customer
When I add <number> products to my cart
Then I should see <number> products in my cart
Examples:
| number |
| 1 |
| 2 |
A Scenario Outline with an Examples section containing a data table with one single row
will end up with the execution of zero scenario; that is unlikely the expected behavior. Thus, each
Examples data table should contain at least two data rows.
Scenario Outline: Add product to cart
Given I am a customer
When I add <number> products to my cart
Then I should see <number> products in my cart
Examples:
| number |
Scenario Outline: Add product to cart
Given I am a customer
When I add <number> products to my cart
Then I should see <number> products in my cart
Examples:
| number |
| 1 |
| 2 |
A Scenario Outline with an Examples section containing a data table with two rows will end
up with the execution of a single scenario. Thus, either some data are missing or the Scenario Outline
can be safely converted to a standard Scenario.
Scenario Outline: Add product to cart
Given I am a customer
When I add <number> products to my cart
Then I should see <number> products in my cart
Examples:
| number |
| 1 |
Scenario Outline: Add product to cart
Given I am a customer
When I add <number> products to my cart
Then I should see <number> products in my cart
Examples:
| number |
| 1 |
| 2 |
OR
Scenario: Add product to cart
Given I am a customer
When I add 1 product to my cart
Then I should see 1 product in my cart