Artillery: Feature: loop until a condition is met

Created on 16 Nov 2016  Â·  7Comments  Â·  Source: artilleryio/artillery

It can be useful to loop until a condition is met.

This could be done with something like a whileTrue hook, which would call back with true or false to indicate whether the loop should continue and would have access to the full context.

discussion enhancement

Most helpful comment

Let's say you have a chat room which is full and users sometimes leave the room. You might want to loop sending a join-room event until you can finally join (someone left and the room is not full anymore).

All 7 comments

Something like this would be great. Added a comment in #308 to describe my scenario.

For me, support for an equivalent of beforeRequest or beforeScenario for loops, with arguments to alter the loop specs, would be great.

Thanks for the info @joesb. Always helpful to have some real use cases in mind when adding a feature!

Let's say you have a chat room which is full and users sometimes leave the room. You might want to loop sending a join-room event until you can finally join (someone left and the room is not full anymore).

:+1: It would be useful.
In my case I upload a file that is queued to process by another service.
Then I asking for file status. Response status code 202 ACCEPTED means that output is still not ready. When I got status code 200 I can continue scenario.

Our case is that we'd like to make a first request that returns an array of URLs and then we want to request each of those URLs. If there is a better way please let us know, but it seems like "loop with a condition" could allow us to do that.

Same thing as this: https://github.com/shoreditch-ops/artillery-core/issues/106

Now available in Artillery 1.6.0-9.

Docs: https://artillery.io/docs/http-reference/#experimental-looping-with-custom-logic

What about the WS engine?

On 22 Sep 2017, at 14:09, Hassy Veldstra notifications@github.com wrote:

Now available in Artillery 1.6.0-9.

Docs: https://artillery.io/docs/http-reference/#experimental-looping-with-custom-logic

—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub, or mute the thread.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

sonisaurabh19 picture sonisaurabh19  Â·  5Comments

CaseyBurnsSv picture CaseyBurnsSv  Â·  4Comments

hassy picture hassy  Â·  3Comments

kennethlynne picture kennethlynne  Â·  5Comments

dshook picture dshook  Â·  5Comments