Karate 在空手道测试框架中,$不打印json响应

Karate 在空手道测试框架中,$不打印json响应,karate,Karate,使用下面的简单脚本,在控制台上打印响应变量,但$shortcut不打印 剧本 Given url 'http://reqres.in/api/users/2' When method GET Then status 200 * print "Hello, world!" * print response * print $ 输出 [ForkJoinPool-10-worker-3] 16:33:36.642 [print] Hello, wor

使用下面的简单脚本,在控制台上打印响应变量,但$shortcut不打印

剧本

  Given url 'http://reqres.in/api/users/2'
  When method GET
  Then status 200   
  * print "Hello, world!"
  * print response
  * print $
输出

[ForkJoinPool-10-worker-3] 16:33:36.642 [print] Hello, world!
[ForkJoinPool-10-worker-3] 16:33:36.643 [print] {
  "ad": {
    "company": "StatusCode Weekly",
    "text": "A weekly newsletter focusing on software development, infrastructure, the server, performance, and the stack end of things.",
    "url": "http://statuscode.org/"
  },
  "data": {
    "last_name": "Weaver",
    "id": 2,
    "avatar": "https://s3.amazonaws.com/uifaces/faces/twitter/josephstein/128.jpg",
    "first_name": "Janet",
    "email": "janet.weaver@reqres.in"
  }
}
[ForkJoinPool-10-worker-3] 16:33:36.644 [print]
根据,我希望$是对响应的引用。

打印必须是“纯JS”,
$
仅对JsonPath表达式方便:

打印必须是“纯JS”,
$
仅对JsonPath表达式方便: