-
Notifications
You must be signed in to change notification settings - Fork 3k
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
"Order of events" clarification #1349
Comments
Hi! You are totally right! It is very confusing! It is fixed in the upcoming (as in any day now) 1.0 release though :) If you want to try it out right away, try installing locust from latest master ( |
Would love to test!! |
Yea, setup/teardown has been replaced by test_start/stop. Guess my link was from my browser history, sorry :) |
Tested latest branch - works great! |
Guys,
Question / clarification about Locust setup (once)
Indeed, it’s called once only, for very 1st HttpLocust instance.
I've set an instance attribute in
setup(self)
is instance method.Consequently, only 1st HttpLocust instance has the attribute set.
All others HttpLocust instances won’t have the attribute and throw an exception on access.
Naturally, setting class attribute instead will take care of it.
A thought:
Since Locust setup() is called once only, should it be class method, not instance one?
Would be nice to add Locust on_start (once per locust) instance method too, seems a bit more logical to me...
Above applies to TaskSet too:
TaskSet setup (once) - should be class method, not instance
TaskSet on_start (once per locust) - is instance method
Not complaining or anything, just want to throw an idea!
Thanks
The text was updated successfully, but these errors were encountered: