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

Cannot Update Custom options in the Web UI when Default Value is None #3011

Open
2 tasks done
timhovius opened this issue Dec 18, 2024 · 0 comments · May be fixed by #3012
Open
2 tasks done

Cannot Update Custom options in the Web UI when Default Value is None #3011

timhovius opened this issue Dec 18, 2024 · 0 comments · May be fixed by #3012
Labels

Comments

@timhovius
Copy link

timhovius commented Dec 18, 2024

Prerequisites

Description

When custom options are set through the Locust WebUI, they consistently return None when accessed via self.environment.parsed_options. In this case, when running lucust -f tasks.py --username test the username is test. That's correct, but when I set this option through the Locust WebUI, it is None which is incorrect.

Command line

lucust -f tasks.py

Locustfile contents

@events.init_command_line_parser.add_listener
def _(parser: LocustArgumentParser):
    parser.add_argument('--user', '--username', dest='username', default=None, help='username')

Python version

3.10

Locust version

2.32.4

Operating system

Linux

@timhovius timhovius added the bug label Dec 18, 2024
@timhovius timhovius changed the title Custom options Custom options in the Web UI Dec 18, 2024
@andrewbaldwin44 andrewbaldwin44 changed the title Custom options in the Web UI Cannot Update Custom options in the Web UI when Default Value is None Dec 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant