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:


Leave a Reply

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

This site uses Akismet to reduce spam. Learn how your comment data is processed.