-1

In my jmeter script: Generate 24-bit random number. I set ${__time(YMDH)}${random}.

Do you know of any other way?

Sam Mason
  • 15,216
  • 1
  • 41
  • 60
gang yan
  • 37
  • 4
  • Does this answer your question? [Generate 'Random number' variables in JMeter](https://stackoverflow.com/questions/45328356/generate-random-number-variables-in-jmeter) – Ori Marko Jan 13 '21 at 13:43

1 Answers1

0

24-bit random number can be:

  • unsigned, in this way you can have values from 0 to FFFFFF in hexadecimal, in this case you can use __Random() function like ${__Random(0,16777215,)}
  • signed, in this case you have from −8388608 to 8388607, in this case you can use __groovy() function like ${__groovy(new Random().nextInt(8388607 - -8388608) + -8388608,)}
Dmitri T
  • 159,985
  • 5
  • 83
  • 133