I have a cucumber script script for testing a web service that looks like:
Scenario Outline: Check the limit functionality When I GET "/api/activity-schedule-items.xml" with parameters {<filter>} Then the xml attribute "total-count" is "<count>" Scenarios: | filter | count | | 'limit' => 0 | 0 | | 'limit' => 2 | 2 | | 'limit' => 2 | 2 | | 'limit' => -1 | 15 |
which works fine, however I want to re-run the same script and scripts for each of our web services. Basically, I would like to add another Scenarios block, for example:
Scenario Outline: Check the limit functionality When I GET "<api>" with parameters {<filter>} Then the xml attribute "total-count" is "<count>" Scenarios: | filter | count | | 'limit' => 0 | 0 | | 'limit' => 2 | 2 | | 'limit' => 2 | 2 | | 'limit' => -1 | 15 | Scenarios: | api | | /api/activity-schedule-items.xml | | /api/activity-schedules.xml | | /api/tasks.xml |
and have a cucumber, make a cross join between two tables.
It would be even better to specify an api table so that it applies to all scripts in this function.
Is there any way to realize this in cucumbers?
source share