I have a seemly simple Cucumber question that I think most of us have encountered. But I do not how to resolve it.
Let's say I have the below scenario outline example. The way it execute is:
1) it retrieve the 1st row of data, use it to execute step 1, 2, 3 in that order
2) then it use 2nd row of data, do the same thing...
3) then the 3rd row...
Scenario Outline: Test state
Given <state> <other_state> is used in step 1
And <state> <other_state> is used in step 2
And <state> <other_state> is used in step 3
Examples: Rainbow colours
| state | other_state |
| missing | passing |
| passing | passing |
| failing | passing |
In my case, my data "state" "other_state" is read from a file so I can not put data explicitly in feature file. And I have already created step definition for 'Given' and 'And' steps.
How can I still run the scenario in a outline kind of way? I can get all the data in 'Given', but I can not make the following steps run N number of times in a loop.