My requirement is to load parameters from an external resource in cucumber
For an example:
Scenario Outline: eating
Given there are <start> cucumbers
When I eat <eat> cucumbers
Then I should have <left> cucumbers
Examples:
| start | eat | left |
| 12 | 5 | 7 |
| 20 | 5 | 15 |
In above example I like to move example data in any external source like excel or JSON and I also want the same behavior to use single scenario with multiple iteration. Currently If I move my data to external source then I need to duplicate the scenario n number of times and using @before I read the data from external source which looks weird approach to me
Before hook we can read data from excel that I already done. the problem is as the example data is out of feature it become scenario not scenario outline which run the scenario only one time. If I put loop in step definition function then if any one data example fails it failed the entire scenario which make it unreliable
I have found one similar post regarding same but that doesn't provide any clarification and the answer doesn't provide any JSON structure , document etc regarding same
Integrating external data source with Cucumber feature file
Do we have any provision for same in cucumber or can we override any existing functionality to achieve same
I would like to know if someone already done it already, if yes please share with us.