方案启动时的日志名称 [英] Log name of Scenario when it starts

查看:48
本文介绍了方案启动时的日志名称的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有没有办法让空手道在执行到日志时自动打印每个方案的名称?我们有一个相当大的套件,可以在Jenkins流水线控制台输出中生成日志数据~25MB,有时在运行结束时尝试将com.intuit.karateERROR记录到故障摘要的行匹配起来有些棘手.很有可能获得方案名称并print(),但这意味着向我想避免的数百种方案中添加代码.

Is there a way to get Karate to automatically print the name of each scenario as it is executed into the logs? We have a reasonably large suite that generates ~25MB of log data in our Jenkins pipeline console output and sometimes it’s a little tricky trying to match a line where com.intuit.karate logs an ERROR to the failure summary at the end of the run. It is most likely possible to obtain the scenario name and print() it but that would mean adding code to many hundred scenarios which I’d like to avoid.

推荐答案

作为此问题空手道将记录场景名称(如果不为空)以及任何故障跟踪.

As part of the fix for this issue Karate will log the Scenario name (if not empty) along with any failure trace.

提供了具有此修复程序的beta版本0.6.1.2,如果您可以尝试并进行确认,那就太好了.

A beta version with this fix is available 0.6.1.2 it would be great if you can try it and confirm.

如果您有更多工作要做,请打开票证,我们将尽最大努力将其纳入即将发布的0.6.2版本.

If you feel more has to be done, do open a ticket and we'll do our best to get this into the upcoming 0.6.2 release.

这篇关于方案启动时的日志名称的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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