有没有办法捕获空手道呼叫的请求和响应? [英] is there a way to capture karate call's request and response?

查看:57
本文介绍了有没有办法捕获空手道呼叫的请求和响应?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在建立一个用于空手道执行的自定义报告,为此,我需要捕获功能文件名,方案/方案大纲名称,方案desc,已发送的请求以及响应状态和响应正文. 我知道我们可以使用karate.info捕获大多数项目,但是有没有一种方法可以捕获发出的请求和收到的响应?

I am building a custom report for karate execution and for that i need to capture the feature file name, scenario/scenario outline name, scenario desc, request sent and response status and response body. I know we can capture most of the items using karate.info, but is there a way to capture request made and response received ?

推荐答案

该响应在responseresponsebytes中可用.

请求位于karate.prevRequest https://github.com/intuit/karate #karate-prevrequest

我确实认为您正在做不必要的工作,因为默认情况下您会在HTML报告中看到这一点.

I do think you are doing un-necessary work, because you will see this in the HTML reports by default.

这篇关于有没有办法捕获空手道呼叫的请求和响应?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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