Is it possible to generate 'Random number' variables in JMeter?
Is there a way of generating a random 4didgit number? For example thread1: ID: 2323 thread2: 3334 thread3: 5643
Please refer to images below:
In JMeter, ‘Random Variable’ config element is used to generate random integer value between a specified range for each iteration. The generated value can be concatenated with a string which is stored in a variable as a string. Refer to the below screenshot, in which ‘rand_CustomerID’ is a random variable which will store a string value like ...
Refer to the below screenshot, in which ‘rand_CustomerID’ is a random variable which will store a string value like custXXXXX; where XXXXX is any random value between 1 to 99999: How to add ‘Random Variable’ in JMeter?
The Random Variable config element allows you set the following parameters: Variable name: You can provide the name of the variable that can be used in your test plan elements. The random value will be stored in this variable. Format String: You can specify the format of the generated number. It can be prefixed or suffixed with string.
The Random Variable config element allows you set the following parameters: Variable name: You can provide the name of the variable that can be used in your test plan elements. The random value will be stored in this variable. Format String: You can specify the format of the generated number.
Use Random JMeter function
${__Random(0000,9999)}
The random function returns a random number that lies between the given min and max values.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With