need to run while loop for multiple users in jmeter

72 views Asked by At

I am using jmeter to test the performance for the ride booking app.I need to run the while controller which runs the events fetching api continuously until the ride is completed or if driver is not available. This runs correctly for one user .But if i run the plan for multiple users then the while controller enters infinite loop.How can I fix this?

1

There are 1 answers

0
Dmitri T On BEST ANSWER

While Controller is being executed unless its condition (a Function or Variable) resolves to true

If it runs into an endless loop - most probably your server responds with something you don't expect, i.e. an error because it gets overloaded.

So I would suggest taking 2 actions:

  1. Temporarily enable storing of responses into .jtl or a separate file and inspect what does the server return and amend your While Controller's condition accordingly

  2. And/or limit maximum number of iterations of the While Controller to some reasonable number, i.e. 10 or 20 or whatever is acceptable value, example __jexl3() function

    ${__jexl3("${status}" != "running" && ${__jm__While Controller__idx} < 20,)}