0
votes

Our web app page needs unique 10 digit number to be entered while submitting a form. How this can be achieved(I have recorded scripts using recording controller of Jmeter. how to pass unique values to parameters)? and

Is it possible to add multiple record controllers to same Test Plan and record different scenarios in different record controllers and execute them one after the other concurrently? How this scenario is achieved in Jmeter?

2

2 Answers

0
votes

There are various built-in functions available in JMeter which can you use to generate unique numbers.

You can use combination of Counter and Time Function You can just use combination of Random and Counter function

Here are some examples that can generate unique 10 digit number for you

${__javaScript(Math.round(new Date().getTime() / 1000))}
${__Random(1111,9999)}${__time(HHmmss)}

For more details on JMeter functions visit.. http://jmeter.apache.org/usermanual/functions.html

After that identify the requests/parameters which need to send unique data and place the above functions where required.

NOTE: You can also use above function in 'User Defined Variables' and then can refer that variable in all your requests.

Regarding, Recording Controllers. Yes you can use multiple recording controllers in single Test Plan. But while recording, just keep one recording controller enabled where you want to record your traffic.

0
votes
  1. The best way to generate 10-digit unique number is using __RandomString() function as:

    ${__RandomString(10,0123456789,)}

    where 10 is length and 0123456789 - is the source

  2. The easiest option to execute different scenarios concurrently is placing them under different Thread Groups providing required number of Threads (Virtual Users). See Running JMeter Samplers with Defined Percentage Probability for advanced execution options.