I want to reset my counter at end of the each iteration of the loop. I implemented solution in my script like in the page
Jmeter - Loop counter in while loop not resetting on exit
but given solution is not working for me . I am using apache jmeter 5.1.1
version I added below code in JSR223
sampler out side the while controller within transaction controller
def counter=vars.get("counter"); ${__groovy(vars.put('counter'\, '2'),)}
Counter
Counter value is resetting but updated counter value not carrying to second iteration
logs: 2019-10-24 14:53:53,281 INFO o.a.j.p.j.s.J.JSR223 Sampler: counter value-----2
Placed JSR223 Sampler outside while controller/trasaction controller/loop controller..
In all the ways it is giving same response like below
I need result as
xrequest-1
xrequest-2
xrequest-3
xrequest-4
xrequest-5
xrequest-6
xrequest-7
xrequest-8 . . .
yrequest-1
yrequest-2
yrequest-3
yrequest-4
yrequest-5
yrequest-6 . . .
Please help me if i am missing anything.