question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Working with long running user flows

See original GitHub issue

My 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:

  1. 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.
  2. 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:closed
  • Created 8 years ago
  • Reactions:1
  • Comments:5 (1 by maintainers)

github_iconTop GitHub Comments

1reaction
pawamoycommented, Nov 16, 2020

Yes it was more for future reference and other users than to answer to the original author 🙂

1reaction
cyberwcommented, Nov 16, 2020

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

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found