I'm familiar with user defined variables in jmeter & have it setup to provide a random email address using;


When running this in a test of 100 threads however I'm seeing the exact same email address being used in post data which is causing errors.

I've got jmeter set to save cookies, but the cookie manager set to clear on each iteration.

So how do the user defined variables actually work? Does each get a value set per iteration? My thread group is setup for 100 threads, so I expected that to create 100 random email addresses based on the above definition of an email address.

1 Answer 1


According to the User Defined Variables documentation:

The User Defined Variables element lets you define an initial set of variables, just as in the Test Plan.


Note that all the UDV elements in a test plan - no matter where they are - are processed at the start.

When you put above expression into the User Defined Variables it is evaluated only once, so the options are in:

  1. Consider switching to User Parameters
  2. Use the above functions combination directly where it is required, JMeter Functions can be used anywhere in the test plan.
  • Thank you. Most of my Jmeter knowledge comes from stack exchange & blog posts instead of the more official resources! Looks like _RandomString () will bring the random string out of user defined vars & provide that in each HTTP request. However I need this for email addresses which may need to be used multiple times in a test plan, but different in each thread. So I'm using UDV + Thread Number in the HTTP Request. Oct 27, 2016 at 8:48

Your Answer

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

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