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

Run the tests for the specified time #196

Closed
diegows opened this issue Sep 14, 2014 · 7 comments
Closed

Run the tests for the specified time #196

diegows opened this issue Sep 14, 2014 · 7 comments
Labels

Comments

@diegows
Copy link

diegows commented Sep 14, 2014

I think it would be great to have an option to define how many time we want to run the tests from the web interface.

@aztlan2k
Copy link

I agree. It's possible to stop the test run using the command line --num-request=N option, but i also think it would be great to have options for stopping after a specified number of tasks have been executed and after a specified time has elapsed.

--num-tasks=N         stop after N tasks have been executed.
--run-time=N[smh]    stop after the specified amount of time, e.g. (300s, 20m, 3h)

Making these available via the web UI would be very useful as well.

@diegows
Copy link
Author

diegows commented Sep 14, 2014

I've been thinking in a workaround in the meantime, may be we can use on_start() method to schedulie the call to the interrupt() method after some time. I have tested it, what do you think?

@livfc
Copy link

livfc commented Sep 18, 2014

I got round this by creating ant targets which start and stop the spawn using the same APIs as the web interface. In between the start / stop, the sleep function is called based on an ant variable. A Jenkins job requests all the parameters and passes to the ant script.

@Jahaja
Copy link
Member

Jahaja commented Sep 18, 2014

I agree. This would be useful.

@garrettheel
Copy link

+1 @aztlan2k

I'm currently using stop_timeout on my Locust to achieve this but I'd prefer to be able to pass in the value as an arg instead of hardcoding it in the locustfile.

@jeffandersen
Copy link

+1, have implemented it with interrupt as a workaround for now. Would be nice to be native.

@heyman heyman changed the title Run the tests for the specified time Remove --num-requests in favor of --time-limit Sep 18, 2017
@heyman heyman changed the title Remove --num-requests in favor of --time-limit Remove --num-requests in favor of --run-time Sep 18, 2017
@heyman heyman changed the title Remove --num-requests in favor of --run-time Run the tests for the specified time Sep 18, 2017
@heyman
Copy link
Member

heyman commented Sep 19, 2017

Fixed by #656!

@heyman heyman closed this as completed Sep 19, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

8 participants