运行每个场景时打印场景名称 [英] Print scenario name when running each scenario

查看:22
本文介绍了运行每个场景时打印场景名称的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想打印每个场景的名称作为测试运行.我可以调用或做什么来获取名称以便我可以执行 * print ?

I want to print the name of each scenario as the test run. What can i call or do to get the name so that i can execute * print <scenario_name> ?

这篇文章的答案正是我想要做的:打印场景名称 有没有办法访问场景对象?

The answer for this post is exactly what i want to do: Print scenario name Is there a way to access the Scenario object?

推荐答案

目前不支持,但很容易添加.但问题是——这只是为了帮助您理解日志吗?因为如果您还没有使用 Cucumber HTML 报告,您应该 - 这就是大多数团队正在使用的:https://twitter.com/KarateDSL/status/899671441221623809

As of now this is not supported, but will be easy to add. But here's the question - is this just to help you make sense of the logs ? Because if you are not using the Cucumber HTML report yet, you should - and that's what most teams are using: https://twitter.com/KarateDSL/status/899671441221623809

有关更多信息,请参阅此讨论:https://stackoverflow.com/a/47555173/143475

Refer to this discussion for more: https://stackoverflow.com/a/47555173/143475

如果你真的需要这个,请提出功能请求.

If you still really need this, kindly raise a feature request.

这将在下一个版本中可用:https://github.com/直觉/空手道/问题/257

this will be available in the next version: https://github.com/intuit/karate/issues/257

这篇关于运行每个场景时打印场景名称的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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