Can anyone explain me following RandomString

72 Views Asked by At

Can anyone explain me following syntax which is used to create randomstring

    ${__time(ddHHMMmmss)}${__javaScript(Math.floor((Math.random() * 10) + 1))}
1

There are 1 best solutions below

0
On BEST ANSWER

Math.floor:

The Math.floor() function returns the largest integer less than or equal to a given number.

As per:

So __javaScript is a JMeter function that will run :

Math.floor((Math.random() * 10) + 1)

It will give you a number between 1 and 10.

Finally __time is a JMeter function that will give the current date using Java format:

ddHHMMmmss

So results could be for today:

  • 12220600539
  • 12220600531
  • 12220600539
  • 12220600537
  • 122206005310 ...