Apache JMeter : Add random data in body for request

  1. Use Random Variable with variable name emailValue and send ${emailValue} in request

  2. Use JDBC request to your database to create random number or sequence and save in variable name emailValue

  3. Use UUID function to create uniqueId and send in email ${uniqueId}@gmail.com for example


My example with __UUID

enter image description here

For POST request, make sure you have correct Content-Type in HTTP Header Manger , application/json for example.


Take a look at JMeter Functions like:

  • __Random() - which generates a random number in the given range
  • __RandomString() - which generates a random string from the given input
  • __threadNum() - which returns the current thread number
  • __UUID() - which returns an unique GUID structure
  • __time() - which returns current time stamp in different formats
  • any combination of above

JMeter functions can be used anywhere in the test so you can put them directly into your request body.

Some more recommendations:

  • Don't use JMeter GUI for running the load test, GUI mode is designed for tests development and debugging only, the tests themselves need to be run in command-line non-GUI mode
  • Remove all the listeners from the test plan while running your load test as JMeter listeners are very resource intensive and create unnecessary overhead.