Create random 16-digit number with Groovy in soapUI

It’s easy as 1, 2, 3.

  • Create a DataGen step with the following:

Type = Script
Mode = Read

  • Add the following script:

long number = (long) Math.floor(Math.random() * 9000000000000000L) + 1000000000000000L

  • That’s it!

Leave a Reply

Your email address will not be published. Required fields are marked *