postman – how to generate random number in specific range?
You can just use Lodash for this as it’s a built-in module: pm.environment.set(“random_number”, _.random(1, 5)) Or just add the number 5 to the _.random() function and this will be a number from 0 to 5.