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

Command line option to specify the duration to run #71

Closed
uday-rayala opened this issue May 9, 2013 · 4 comments
Closed

Command line option to specify the duration to run #71

uday-rayala opened this issue May 9, 2013 · 4 comments

Comments

@uday-rayala
Copy link

We currently run locust tests manually with someone keeping track of the time. And we will stop the tests after 'x' minutes. We now want to automate running of locust tests in Continuous Integration server. But I dont see a command line option in locust to specify the duration to run the tests. This makes it very hard to integrate with CI server.

@bogdangherca
Copy link

You could try the stop_timeout field in the Locust class, which is the number of seconds after which the locust will die. If it's None, it won't timeout.

It will be something like this:

class MyLocust(Locust):
   task_set = MyTaskSet
   stop_timeout = 10
   ...

Alternatively, if you must use a command line option, you could use the -c/--clients option which specifies the number of clients to spawn and then stop. And if you can estimate how many clients are created in 'x' minutes in your test, then your good to go.

@nmccready
Copy link

These (here and #78 (comment)) issues are similar and or different. Should they be merged?

@uday-rayala
Copy link
Author

Although both of us want is for the same purpose, I want it to be as a command line option so that the execution can be automated where as the other person wants it on the web page.

@aldenpeterson-wf
Copy link
Contributor

Resolved in #656

pancaprima added a commit to pancaprima/locust that referenced this issue Aug 21, 2018
add command for integration test and the repetition
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants