对象


表示公共参数的值Json对象格式,可以将VALUE中的值通过Jsonpath、Spel获取Json对象中的参数值赋值给用例中参数。

如公共参数OneObject值:

{
  "code": 200,
  "msg": "成功!",
  "data": [
    {
      "picUrl": "https://yaxa.ndn.net/54fe672080fa28052e5faa72fe7863.jpg",
      "expireTime": 0,
      "onlineTime": 0
    },
    {
      "picUrl": "https://yaxa.ndn.net/cb509d41739f8ce3764973e48886f3.jpg",
      "expireTime": 0,
      "onlineTime": 0
    }
  ]
}

在用例中应用:

  • 若入参为OneObject对象中code参数,值列表达式为:${$.OneObject.code},外层的${}表示引用的为公共参数,$.OneObject.code表示code参数的索引路径。

在用例入参与校验中都可以通过Jsonpath、Spel获取Json对象中的参数值给参数赋值。

Copyright © GoApi 2018 all right reserved,powered by Gitbook该文件修订时间: 2019-11-08 15:59:17

results matching ""

    No results matching ""