I tried finding this solution but no luck. Its very simple requirement and I think cucumber has solution which I am not aware of.
I want to use same set of examples of scenario outlines to the multiple features. Every time I don't want to copy paste same set of example, it will lead to non-maintainability of feature files.
I tried with cucumber java with below example
Given The Economy is up for actions
When I make GET request to get **device** list with limit as <limit>
Then I should get success status as true
And I should get the **device** list with <limit> members
Examples:
| limit |
| 1 |
| 10 |
| 25 |
Given The Economy is up for actions
When I make GET request to get **user** list with limit as <limit>
Then I should get success status as true
And I should get the **user** list with <limit> members
Examples:
| limit |
| 1 |
| 10 |
| 25 |
Here you can see only When step is making difference, where in both steps limit examples are same. This is just an example, I have lot many cases like this in which I need to use different set of examples.
One thing which I love about testNG is data providers which will solve this problem easily. But looking forward to get similar in cucumber.