Forum Discussion

mmanideep's avatar
mmanideep
New Contributor
5 years ago

In Soap UI , how can i pass array of values to the request body using custom properties.

Hi Team,

 i want to pass multiple input values to below request body using custom properties. can you please help to sort out the problem.

Sample Body :
"rolePermissionInfo"
: [ { "name": "string", "permission": "string", "centername": "string", "displayname": "string" } ]

 

 

  • Hi mmanideep :

     

    It depends how to want to send properties

     

    1. if you want to send properties in below format :

     

    "rolePermissionInfo": [
          {
            "name": "string",
            "permission": "string",
            "centername": "string",
            "displayname": "string"
          },
    {
    "name": "string",
    "permission": "string",
    "centername": "string",
    "displayname": "string"
    } ]

     Then you can use save values in custom properties and parameterize the request with below syntax:

     

    ${Properties#permission1}

    ${Properties#centername1}

    ${Properties#displayname1}

    ${Properties#permission2}

    ${Properties#centername2}

    ${Properties#displayname2}

    and so on

     

     

    2. If you want to hit same request with multiple data, then you can write custom groovy which will execute your request multiple time with different of set data.