Skip to content

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

Closed
@timhovius

Description

@timhovius

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions