[{ "externalKey": "1", "customerDetails": { "address": { "address": "111 Bourke St", "country": "AU", "postcode": "3044", "state": "Victoria", "unitOrBuilding": "1" }, "emailAddress":"[email protected], "phoneNumberInternational": "+61360000001"



{ "externalKey": "2", "customerDetails": { "address": { "address": "111 Bourke St", "country": "AU", "postcode": "3044", "state": "Victoria", "unitOrBuilding": "1" }, "emailAddress":"[email protected], "phoneNumberInternational": "+61360000002"


The external key, email address and telephone numbers must be unique in each request.

I have created a code in RunSwift tool to generate the bulk API requests and then aligned the requests in website and then copied/pasted them in JMeter.

I believe the above approach has lot of manual dependancies. Hence I would like to know if there is a way to automatically populate the values in JMeter and generate random values for 3 variables (key, email and phone) every time I submit the HTTP request.

1 Answer 1


It is, check out the following JMeter Functions:

  • __Random() - generates a random number in the given range
  • __RandomString() - generates a random string from the given characteres

Example use cases:

  • For phone: +${__Random(1111111111,9999999999,)}
  • For email: ${__RandomString(10,abcdefghijklmnopqrstuvwxyz,)}@example.com


JMeter Random Demo

See Apache JMeter Functions - An Introduction for more information on JMeter Functions concept:

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.