我们可以使用空手道从另一功能中调用场景吗? [英] Can we call a scenario from one feature in another using karate?

查看:80
本文介绍了我们可以使用空手道从另一功能中调用场景吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们正在使用空手道,这非常有趣. 抱歉,但我没有发现有关我的问题的任何信息. 我们有一个带有几个场景的特征A.我们需要该文件中的一个方案.我们可以在功能B中称呼它吗?

We are using karate, wich is very funny. Sorry, but i didn't find any information about my issue. We have a feature A with several scenarii. And we need one scenario from that file. Can we call it in our feature B?

推荐答案

否.您需要将该场景提取到单独的*.feature文件中,然后使用 call重新使用关键字.

No. You need to extract that Scenario into a separate*.feature file and then re-use it using the call keyword.

空手道0.9.0及更高版本将支持按如下所示通过标签进行呼叫:

Karate 0.9.0 onwards will support being able to call by tag as follows:

* def result = call read('some.feature@tagname')

这篇关于我们可以使用空手道从另一功能中调用场景吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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