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
run each task in sequence #311
Comments
You can't have tasks run in a sequence. However, you can make multiple requests within the same task which would be run sequentially. |
Does anyone know if there's a tool like Locust that allows for sequential task running? That would be hugely useful... |
@vividhsv why cannot we not add functionality like sequence task ? .. |
I have had similar issues in the past where the sequence of events needs to be correct to accurately measure performance for a business case. To make tasks more readable, you can break them down into separate methods without the @task decorator and have a single task control the sequence of events. Locust still reports each request made, whether you put those requests into single tasks or not. |
@heyman @HeyHugo @cgbystrom @Jahaja can we get this added as a feature? Would this be difficult to just accomplish on a fork @giantryansaul @vividhsv @sp1rs ? |
I think I meant more that your task can define the entire workflow and not just a single request. You would not need a fork of locust to accomplish this. Here is an example:
|
I raised this issue, and as far as I am concerned @giantryansaul offers a reasonable solution. |
When you put multiple requests under the same task as showed above, is the min and max wait still applied to each request or does it only apply to each task? From the documentation I understand that the waits are only applied to each task. Therefore, is there a way to run requests sequentially and still have the waits applied to each request? Thanks! |
@javivdm The waits are applied to the tasks, so you can use sleep functions to specify waits between the requests. |
This issue #171 mentions sorting the tasks and overriding the get_task method to do it sequentially |
@javivdm You can make a Locust user sleep between making requests in the same task by manually calling (Super late reply, but posting it for anyone else who might have the same question) |
How to do so? |
Is there a way to run each task in a sequence, instead of being chosen randomly?
The text was updated successfully, but these errors were encountered: