-
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
Class picker incorrectly populates Parsed Options #2192
Comments
@mikenester Could you take a look? |
Whoops! Yeah i'll take a look asap |
I think this is happening when |
@cyberw @Vino4 is the expected behavior on this issue correct? If I have the following in a file called from locust import HttpUser, task, between, events
@events.test_start.add_listener
def on_test_start(environment, **__):
user_classes = environment.parsed_options.user_classes
print("\nevent listener:\n", user_classes)
class Base(HttpUser):
wait_time = between(1, 2)
@task
def base(self):
self.client.get("/") It prints the following when Locust is ran with
Meanwhile, it prints the following when Locust is ran with
Based on this, I would expect |
I'm very new to Locust so not quite sure, but from a users' perspective I propose that the expect behavior when running the following code snippet:
with
The reasoning is: When I run
This is operating under the assumption that the intended behavior when setting the class using class-picker is to simply specify the class when the test starts rather than when the test initializing :) Support point: When specifying any custom arguments through the Web UI, they're injected into |
@cyberw Any thoughts on the above ^ ? |
@Vino4 's comment makes sense to me. |
I have a PR open with the fix: #2201 |
Should be fixed now |
Describe the bug
When using the Web UI's class picker, Parsed Options are incorrectly populated
Expected behavior
Each name of a picked class is available as a single item in the
environment.parsed_options.user_classes
listExample when selecting the class "PurchaseUser":
Actual behavior
When choosing classes through class picker, the name of the class is broken into characters. Each character is present as its own item in the
environment.parsed_options.user_classes
list.Example when selecting the class "PurchaseUser":
Steps to reproduce
environment.parsed_options.user_classes
list in thetest_start
listenerEnvironment
locust --class-picker
The text was updated successfully, but these errors were encountered: