Reputation: 2088
Let's say I have a feature file that tests sending messages. This functionality is the same for admins, supervisors, and employees, so the same scenarios will work on the three different types of accounts. But I want to test all three kinds of accounts.
Can I set all the Scenarios in my feature to run three times, on each kind of account, only using Background
?
I know I can do something like this:
Scenario Outline: Test sending messages
Given a <user>
And some stuff here
When I click Send
Then The messages should be sent
Examples:
| user |
| Admin |
| Supervisor |
| Employee |
That example works, however by doing that, I have to reuse that same Examples column for every Scenario, rather than just once in the Background
.
Upvotes: 0
Views: 1130
Reputation: 32954
No, this isn't supported I don't think. This sort of functionality has been requested a few times, but I think its the gherkin syntax that doesn't support this, so it would need to be extended first I think, before specflow could be extended to support it.
Upvotes: 1