How to generate random number in Jenkins

Spread the love


Just use Random() in Groovy.

Example:def num = new Random().nextInt(10)

In this case num will be an integer number with random value between 0 and 10

Leave a Reply