空手道 - 在整个响应中搜索字符串的最简单方法是什么

Karate - What is the easiest way to search the entire response for a string

我只是想在整个响应中搜索一个字符串。

我目前使用的代码如下:

And string responseString = response
Then match responseString contains "mySearchString"

有没有一种方法可以在不必将响应转换为字符串的情况下执行此操作,这样我就可以用 1 行代码而不是 2 行代码来完成此操作?

给你:

Then match karate.toString(response) contains "mySearchString"