1
votes

I have created a list of lists in jsr223 preprocessor and want to run a loop for size of list and print the elements in list in post processor inside the loop. But i am unable to use the count variable in loop controller. enter image description here

enter image description here

enter image description here

The end result i need is in first iteration of loop [1,2,3,4,5] second iteration [6,7,8,9,10]

at present im getting no output because loop controller is not reading count variable.

1

1 Answers

2
votes

JSR223 PreProcessor is being executed before request so by the time your Loop Controller is being kicked off your count variable is not initialized yet.

Convert JSR223 PreProcessor into a JSR223 Sampler and your code should start working as expected.

If you don't want JSR223 Sampler to appear in your test results add the next line to your script:

SampleResult.setIgnore()