groovyjmeter

How to generate numbers in order from 1 to 10000 in groovy?


I need to parameterize the script so that the numbers are used in order


Solution

  • You can use the range syntax to generate an array of in order numbers.

    def countParam = 10000
    ​def range = 1..countParam
    
    => [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, ...]