soapUI: One liner random number Groovy script

,

Add the following in a Groovy Script step; for example, called “Random”:

context.randomValue = String.valueOf((int)(Math.random()*9999999))

Use in request like so:

${Random#result}