如何在带有放心的Json Request中发送带有特定属性的文本的随机字符串

时间:2019-12-18 06:15:02

标签: rest-assured

我如何在放心的Json Request中发送带有特定属性的文本的随机字符串(如Kat_randomstring)?

我想在json以下的“ externalId”属性中发送“ kat_randomstring”之类的数据,然后放心调用put请求。

Json:

{
  "entitlement": {
    "externalId": "TL",
    "refId2": "Kat1",
    "customer": {
      "identifier": "custId",
      "name": "test_cust"
    },
    "partners": {
      "partner": [
        {
          "identifier": "partId",
          "name": "test_part"
        }
      ]
    },
    "lineItems": {
      "lineItem": [
        {
          "productName": "APA2 7.2",
          "quantity": 5,

          "licenseStartDate": "2019-11-28",
          "licenseEndDate": "2020-12-31",

          "features": {
            "feature": [
              {
                "featureName": "RA_Basic",
                "externalId": "f3",
                "licenseQuantity": 10

              }

            ]
          }
        }
      ]
    }
  }
}

0 个答案:

没有答案