Karate - Possible to put scenario in a loop?

元气小坏坏 提交于 2019-12-24 01:17:09

问题


I want to know if it's possible to put scenario in a loop?
Imagine I have a scenario that I want to test it 10 times with 10 different data in a list. It's a good Idea to put whole scenario in a loop and even set scenario name in the loop. Is it possible?


回答1:


Yes, this is what Karate's data-driven call does. You need to split code into a second feature file (with only one scenario).

Here is the link to the documentation: Data Driven Features.

And in the karate demos look at the examples call-json-array.feature and call-table.feature.



来源:https://stackoverflow.com/questions/47072459/karate-possible-to-put-scenario-in-a-loop

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!