1
votes

I am load testing a web site. I have request "A" and "B". For request "A", i have a parameter field "Quantity", where i am passing values as 1, 10, 15 and 16 through csv files. And from same request , i am extracting ""Quantity", through regex and passing it to request "B". Request "B" is placed under while controller and i have user function in while controller as ${__javaScript(${QUANTITY}<10),}

Request B is executed for infinite time and each time parameter fetched is "1".

Kindly provide your valuable suggestions for above scenario, since i want the request to fetch value "1", execute it and come out of the while loop.

1
can you please share the Test Plan screenshot highlighting While controller, and Regular Expression Extractor under Request A? - Naveen Kumar R B

1 Answers

1
votes

Your JavaScript expression is incorrect

${__javaScript(${QUANTITY}<10,)}  - correct one
${__javaScript(${QUANTITY}<10),}  - your one

Comma should go after 10, not after the closing bracket. Use The Function Helper Dialog in order to create syntaxically correct JMeter Functions.

See Using the While Controller in JMeter article for more information on using the While Controller