-
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
Change Locust/SubLocust API #43
Conversation
Sure, the TaskSet style has been discussed a few times (at least in the corridors at ESN). But renaming Locust to User would a lose a bit heritage of the project. The idea behind the name was locusts swarming your site/application, which makes the concept of Locusts quite easy to explain as many can relate to the real world analogy. Changing would require to rename the "hatch" related concepts, as they would make no sense for "Users" (they probably are supposed to represent humans). Having a more vague definition of the test base class would also be useful when not modeling users. For example, modeling a server representation rather than a user. |
Good point with a more vague base class and testing something that isn't exactly "users". I'm fine with keeping it. I'll update my above example code. |
…Set class, described in #43
…. Improved docs in general.
I've implemented the API described above. All tests (including a few new ones) passes and the documentation has been updated (and gotten a few general improvements). I'm going to go ahead and merge this if no one objects. Please feel free to look at it and give feedback. I'm pretty sure there are typos and grammar errors in the docs, but in general the documentation should be in an improved state :). |
Implemented new TaskSet/Locust API
Merged it! If someone has feedback, add commit comments :). |
I've been thinking about how we can improve the Locust API when it comes to the task scheduling/Locust/SubLocust parts. I think the current API is really good for realistically simulating real users with few lines of code. However, I think that the naming is a bit confusing, and that it can be an obstacle for new users to understand Locust.
This issue is very much related to #16
Here is an idea for a slightly changed API which I think could make it much clearer:
It makes for a slightly more complicated "Hello World" locustfile, but at the same time it separates the purpose of Locust from the purpose of TaskSet.
A few points about the above idea:
What do you think? This is just an idea, and it would be great with feedback :)!