I have been reading the difference between scenario and scenario outline from different resources, but everywhere I could able to find is that ' Scenario works with single values, where you can use Scenario outline to run the same scenario for multiple examples.
But in practical, I am not seeing this difference. I am able to use Scenario and Scenario Outline interchangebaly without any issue even when I have multiple examples.
Can someone please tell me is it something which is being allowed in any recent version of Specflow? And are there any actual differences between Scenario and Scenario Outline?
Specflow version which I am using is: 3.1.89
Scenario outline is a template. The steps for related scenarios are the same, but the system behavior can be different for different data. Consider the following example:
Scenario Outline:
Given the system is up and running
When the user provides value <TestData>
Then the system should display <ExpectedResult>
Examples:
|TestData| ExpectedResult |
|True | Operation failed |
|False | Operation succeeded|
Without the scenario outline you would have to prepare the following scenarios:
Scenario:
Given the system is up and running
When the user provides value True
Then the system should display Operation failed
Scenario:
Given the system is up and running
When the user provides value False
Then the system should display Operation succeeded
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With