【问题标题】:Through karate , how can I assert for not existence of node?通过 karate ,我如何断言节点不存在?
【发布时间】:2020-08-12 17:16:09
【问题描述】:

在下面的 json 有效负载中,我如何断言 D 节点不存在以响应空手道。

{
DTO:{
content : [
A: "";
B: "";
C:""
]
}
}

【问题讨论】:

    标签: karate


    【解决方案1】:

    阅读文档:https://github.com/intuit/karate#fuzzy-matching

    * def response = { foo: 'bar' }
    * match response == { foo: '#present', baz: '#notpresent' }
    

    您的示例不是格式正确的 JSON,请不要再这样做了。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2020-05-29
      • 1970-01-01
      • 2019-03-22
      • 1970-01-01
      • 2018-11-09
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多