Goal:
I would like to visit 10 different URLs of the form http:localhost/path/item/${id}
where id
is a Random Variable. For each of these URLs, I want to request them until the response returns a specified string.
Current setup:
I have a While Controller with an Http Request under it. The condition looks like ${__javaScript('${response}'.indexOf("my string") == -1,)}
(the response
variable is saved via a JSON Extractor). I also have the Loop Count in the Thread Group set to 10.
Problem:
My test plan works fine, but only for one URL. It's as if it's ignoring the Loop Count setting. Assuming the While Controller makes two requests per URL, it's only making two requests total, rather than expected 20.
This is puzzling because if I use a Loop Controller with a Loop Count of 5, it makes 50 total requests.
How can I achieve the desired behavior?