如何在空手道要素线中传递变量值? [英] How to pass variable value in feature line in karate?

查看:54
本文介绍了如何在空手道要素线中传递变量值?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

让我们说我有一个在后台定义的变量

Lets say I have a variable which I defined in the background

Background: 
* def checkin = '2018-10-05'

现在我希望我的功能线看起来像

Now i want my feature line looks like

Feature: checkin date is '2018-10-05'

我尝试过

Feature: checkin date is '#(checkin)'

但是它不起作用.

推荐答案

不支持动态功能名称.

听起来您只是想在报告中获得更好的格式?使用Scenario Outline-在触发时您将看到每个Examples行的值.

Sounds you are just trying to get some better formatting in the report ? Use a Scenario Outline - so you will see the value of each Examples row when it fires.

只需使用print,您将在报告中看到您想要的任何内容.

just use print and you will see anything you want in the report.

好吧,这将在下一个版本中实现: https://github.com /intuit/karate/issues/553

okay this will be possible in the next version: https://github.com/intuit/karate/issues/553

这篇关于如何在空手道要素线中传递变量值?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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