空手道:处理来自被调用特征文件的 soap 响应

karate : handling soap response from a called feature file

first.feature 给定你的''

second.feature 背景: *def fetch = 读取('first.feature') *def data = 调用 fetch

场景:

first.feature 按预期工作(响应在 soap 中) 当我尝试在另一个功能中调用此功能时,响应为 json 格式。

我想使用此响应中的值将其传递给另一个请求。 我必须使用 res["s:Envelope"]["_"]["s:Body"][][].. 才能做到这一点。

有没有办法像我们在 first.feature 中那样轻松地从此响应中获取值? 请任何人告诉我如何实现这一目标。

进行此更改:

* xml res = data.response

我们会在下个版本中改进这个,如果你能测试develop分支并确认就更好了:https://github.com/intuit/karate/wiki/Developer-Guide