我有用于测试web服务类似于一个黄瓜方案概要:如何使用不同参数重新运行黄瓜场景大纲?
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 |
的正常工作,但是我想重新运行同样的情景大纲和方案,供我们每一个web服务的。基本上,我想添加另一个Scenarios块如:
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 |
并且让黄瓜做两个表之间的交叉连接。
更好的办法是指定“api”表格,以使其适用于该功能中的所有场景。
有没有一种方法可以在黄瓜中执行此操作?