I'm finding it difficult to use multiple Scenario Outlines to use the same example and run in a sequence. My use case is for a feature to test like this:
Scenario Outline: Time consuming login process
When I enter login credentials for <user>
Then I should be on the home page
Examples:
| user |
| user1 |
| user2 |
| user3 |
Scenario Outline: User action 1
Given I am logged in
When I do something
Then I should see response
Examples:
| user |
| user1 |
| user2 |
| user3 |
#Many more tests needed to be done for each user
The issue with using Scenario Outline for every Scenario is that the time consuming Scenario (login) would need to run for each test. To deal with this, I've run these tests as one big Scenario Outline:
Scenario Outline:
#Scenario: Time consuming login process
When I enter login credentials for <user>
Then I should be on the home page
#Scenario: User action 1
Given I am logged in
When I do something
Then I should see response
#More tests here
Examples:
| user |
| user1 |
| user2 |
| user3 |
I've found running all tests as one large Scenario Outline has made them run faster, but the cucumber reports and distinction between the Scenarios is less clear.
Is there a way to nest Scenarios in Scenario Outlines? If not, what is the best practice for this situation?