Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

JMeter Append Random Number to Form Field

Tags:

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

like image 812
David Avatar asked Nov 07 '12 15:11

David


2 Answers

You can use random function.

So your email address will be like:

testing${__Random(1,10000000)}@my-internal-test-email-server.com 
like image 165
Andrei Botalov Avatar answered Sep 29 '22 19:09

Andrei Botalov


Also you can use ${__UUID}@test-email.com - it ensures that your email will be unique. Always.

like image 44
Ivan Trechyokas Avatar answered Sep 29 '22 18:09

Ivan Trechyokas