Working with long running user flows
See original GitHub issueMy use case is mostly with long running user flows (see hypothetical example to get the idea). The whole flow might take 15-20 minutes to execute.
class BatchJobTask(TaskSet):
def upload_batch_data(self):
pass
def create_batch_job(self):
pass
def delete_batch_job(self):
pass
def start_batch_job(self):
pass
def download_batch_job_result(self):
pass
def wait_for_batch_job_to_finish(self):
pass
@task
def user_flow(self):
self.upload_batch_data()
self.create_batch_job()
self.start_batch_job()
self.wait_for_batch_job_to_finish()
self.download_batch_job_result()
self.delete_batch_job()
class BatchJobUser(HttpLocust):
task_set = BatchJobTask
The problems that I currently see are:
- When stopping test some users will be in the middle of flow execution. Which means that essentially system under test will be left in dirty state. I would need a mechanism to gracefully stop test so that user flows execute till the end.
- I would prefer to have a control of how many user flows will be executed in total. Say I want 20 concurrent users emulated, but in total I want 100 user flows executed. Currently it seems there is no way to specify this. Either users will be hatching infinitely (until test is stopped), or I can specify total requests to be performed (which will not make sense in multi-request user flow scenario).
Any ideas?
Issue Analytics
- State:
- Created 8 years ago
- Reactions:1
- Comments:5 (1 by maintainers)
Top Results From Across the Web
Running User of a Flow
The running user of a flow is the user that launched the flow. The running user determines what a flow that runs in...
Read more >How to architect long running flows which exceed the 30 day ...
The way to work around this is to create one flow per approval, and then have them call each other as they go...
Read more >Solved: Long Running Flows - Power Platform Community
When I drill down into the flow, and look at the actions, no action is taking more than a couple of seconds.
Read more >Power Automate: Long-running Flows
Your Flows will run fast · You can easily restart a step in case of a failure without the need to start the...
Read more >User flow
By their very nature, funnels will shrink at each step where users drop out. Data will indicate where your funnel is 'leaky' (with...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Yes it was more for future reference and other users than to answer to the original author 🙂
This ticket is way old 😃
But yes,
--stop-timeout
, combined with-i
from https://github.com/SvenskaSpel/locust-plugins#command-line-options should solve this particular case very well