JMeter Append Random Number to Form Field

David picture David · Nov 7, 2012 · Viewed 42.4k times · Source

I am load testing a registration form on my internal website and it has one field which must be unique (email address). I'm using JMeter (following this tutorial). I have a HTTP Request under the Recording Controller in a Thread Group in my test plan.

How do I configure this HTTP Request to add a random number to my email address field (see screenshot)? My company's internal test email server will accept anything at its domain (so like [email protected]). How can I configure JMeter to add a random number to the email address which should make it unique? enter image description here

Answer

Andrei Botalov picture Andrei Botalov · Nov 7, 2012

You can use random function.

So your email address will be like:

testing${__Random(1,10000000)}@my-internal-test-email-server.com