Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature: loop until a condition is met #207

Closed
hassy opened this issue Nov 16, 2016 · 7 comments
Closed

Feature: loop until a condition is met #207

hassy opened this issue Nov 16, 2016 · 7 comments

Comments

@hassy
Copy link
Member

hassy commented Nov 16, 2016

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.

@joesb
Copy link

joesb commented Jun 21, 2017

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.

@hassy
Copy link
Member Author

hassy commented Jun 22, 2017

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

@Cristy94
Copy link

Cristy94 commented Aug 18, 2017

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).

@wiktor-obrebski
Copy link

👍 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.

@jordan-brough
Copy link
Contributor

jordan-brough commented Sep 19, 2017

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: artilleryio/artillery-core#106

@hassy
Copy link
Member Author

hassy commented Sep 22, 2017

Now available in Artillery 1.6.0-9.

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

@Cristy94
Copy link

Cristy94 commented Sep 22, 2017 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants