Forum Discussion

KAwad's avatar
KAwad
New Contributor
11 years ago

Parameterizing a Request in REST API Test using SoapUI Pro

Hi,

We are trying to parameterizing one value in the request body for a REST API we testing using SoapUI.

This is a create member API, so every time i am hitting it, i need to enter a unique email address, in order to create a load test to create 10k users eventually.

The request body i am using is like this:
{"personEmail":"tester1@mycompany.com",
"name":"Tester","password":"password1",
"agreeTermsConditions":true,"agreeHipaaPolicy":true,
"username":"tester1",
"timeZoneKey":"EST",
"confirmPassword":"password1"}

The personalEmail fields is the primary key for the member record, and this needs to be parameterized somehow to be tester1 then tester2 and so on..

Thanks in advance.

3 Replies

  • nmrao's avatar
    nmrao
    Community Hero
    I believe that there few more fields that may needed to be parameterized for ex username, password too..
    Isn't it good idea to read the data using datasource? send REST call, then continue loop thru..
  • KAwad's avatar
    KAwad
    New Contributor
    The email address is the only unique field in this call, so two members cannot have the same email address.

    I am trying to achieve 2 goals with this test:
    1) Create any number of new members just by adding this SoapUI project to LoadUI, then let it run for as long as i want
    2) Test the performance of the API itself under load

    I thought there is a way to do this without the need of reading the data from an external datasource, by adding a code to the request body's itself.

    Thanks.
  • nmrao's avatar
    nmrao
    Community Hero
    I think you that is not mandate it needs to read data from source. You may also generate random data using groovy for the unique field.