I am trying to load test a Register-Search application which will do as the name suggests for ~5 million mobile numbers. Will be using 100-500 threads with looping through a specific delay between each loop.
I have the functional test JMeter script ready for the same. The only change I want to do is generate the mobile number automatically.
The easiest solution would be doing having the mobileNumber
as ${random(${min},${max})}
. But I want to avoid it and get a more linearised approach by using property mobileNumber
In a JSR223 Sampler (using Groovy script), I was trying to read the property as
long number = ${__P(mobileNumber)}
vars.put("mobileNumber", String.valueOf(number))
I wish to use the UDV mobileNumber
thus created in current thread and increment the property mobileNumber
by 100. Trying to do:
number = number + 100
${__setProperty(mobileNumber, String.valueOf(number))
For some reasons it is not working and giving error message Response message:
javax.script.ScriptException: javax.script.ScriptException: groovy.lang.MissingPropertyException: No such property: number for class: Script1
Cant figure out whats wrong ?