I'm using SpecFlow in order to BDD my application. I would like to iterate test, while each iteration repeats the previous parameters assigned.
Since this step should executed around 120 times I don't want to rewrite same test with different parameters.
Is it possible to iterate scenario parts only?
The real scenario:
I have application function which opens file and close it.
I would like to open and close files until the application fails.
The last test suite I made (using pure C# code) Memory leaks in the application under test were found causing failures at the 10th iteration, still after debugging the application under test it fails at the 50+ iterations(again due to memory leaks).
I would like to use spec flow to test this scenario.
For logging reasons I would like to split each iteration to different scenario. so instead of writing feature file contains many sub scenarios, is there a way to tell SpecFlow to iterate in ascending repeat sequence?
The scenario:
Scenario Outline: Open and close fileTestScenario1
Given Ready for input
When Open file <file_name>
Then File content is visible
Examples:
| file_name |
| param1 |
| param2 |
| param3 |
So I would like SpecFlow to generate the following tests:
- invoke scenario with param1 (Invoke with param1 and assert)
- invoke scenario with param1 and param2 (Invoke with param1 and assert then invoke with param2 and assert)
- invoke scenario with param1 and param2 and param3(Invoke with param1 and assert then invoke with param2 and assert then invoke with param3 and assert)
- ...
I know that scenario is atomic test unit, but still, if I want to perform this task - how can it done?