I have problems picking up variables set by the Regular Expression Extractor in a Beanshell.
- I have an HTTP Request sampler which returns a list of 50 numbers in random form (4, 2, 1, 3....50, 45) which I have extracted via regEx.
- Now I want to get each and every numbers in a variable so I used again regEx with expression (.+?)(,) on JMeter variable from step# 1 above.
- I have problem here at this step when I am using BeanShell to access these values
Wasn't very sure I used below:
long var1 = Integer.parseInt(vars.get("Number_i"));
print("Value of var1: " +var1);
Practically I want to do this:
for (i=0; i<50; i++) {
if (var1==1) {
do this
}
}
I am not adept at Jmeter, so please bear with me.