-
Notifications
You must be signed in to change notification settings - Fork 2.9k
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
CLI argument for selecting UserClasses
to run
#2786
base: master
Are you sure you want to change the base?
Conversation
Can we comment out the deprecation warning for now? I do want to deprecate it, but not yet :) On an unrelated note, I'm looking for endorsements/testimonials to put on our web page, could you say a few words about Locust? Of course I want you to say what you think, but it could be something along the lines of "At the University of Oulu we use Locust to test the performance of our systems. Its flexible and developer friendly approach makes it the best tool for us. Alexander Bakhtin” |
@cyberw I commented out the deprecation warning for now. About the testemonial, you can email |
@@ -420,6 +420,12 @@ def setup_parser_arguments(parser): | |||
help="User configuration as a JSON string or file. A list of arguments or an Array of JSON configuration may be provided", | |||
env_var="LOCUST_CONFIG_USERS", | |||
) | |||
parser.add_argument( | |||
"--run-users", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think --user-classes
is a better name
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This creates an error since here
locust/locust/test/test_load_locustfile.py
Line 169 in 137a269
u 100 # Short form |
you have short-form
u 100
, which gets parsed as --u 100
instead of -u 100
for some reason and so it gives an error because it cannot distinguish between --users
and --user-classes
if we use such a name
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yea I figured what might cause an issue. I think --run-users is a bad name though. Can you think of something else?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The best way would have been changing --users
to --num_users
and then adding --user-classes
, but this is not backward-compatible.
Can you update this test to use the new style: locust/locust/test/test_main.py Line 2205 in 8a35d8d
|
Fixes #2745
Argument parser now has an argument
--run-users
that is a list of UserClasses to choose.Old version (simply listing classes without an arg) is still supported, even in the same call, but issues a warning that this method is deprecated