空手道-可以将场景循环吗? [英] Karate - Possible to put scenario in a loop?

查看:88
本文介绍了空手道-可以将场景循环吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想知道是否可以将场景循环吗?
想象一下,我有一个场景,要使用列表中的10个不同数据对其进行10次测试.将整个场景放在一个循环中,甚至在循环中设置场景名称都是一个好主意.有可能吗?

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?

推荐答案

是的,这就是空手道的数据驱动call所做的.您需要将代码拆分到第二个功能文件(只有一种情况).

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

以下是文档的链接:数据驱动功能.

空手道演示中,请查看示例call-table.feature.

这篇关于空手道-可以将场景循环吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆