Sharing a common set of Examples across multiple Scenario Outlines in Specflow
Question
Is is possible to share a common set of examples across multiple scenario outlines in Specflow without duplicating the set of examples for each outline?
e.g. excuse the noddy example, but here the Examples
are repeated for each Scenario Outline
and I want to know if it's possible to declare those Examples
once and use them for each Scenario Outline
?
Feature: Just an example about animals
Scenario Outline:
Given an <animal>
When something happens
Then this should be the outcome
Examples:
| animal |
| Dog |
| Cat |
Scenario Outline:
Given an <animal>
When something different happens
Then this other thing should be the outcome
Examples:
| animal |
| Dog |
| Cat |
La solution
It appears this is not actually possible in SpecFlow.
Autres conseils
I am not sure about SepcFlow, but we have done this in Cucumber where the Given step is shared in this instance.
I would expect SpecFlow to work in a the same way.
Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow