Log name of Scenario when it starts

我的未来我决定 提交于 2019-12-11 07:27:45

问题


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.


回答1:


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

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

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.



来源:https://stackoverflow.com/questions/47555016/log-name-of-scenario-when-it-starts

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!