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

Custom parameters incomplete display #2628

Closed
2 tasks done
eternalstop opened this issue Mar 13, 2024 · 1 comment · Fixed by #2631
Closed
2 tasks done

Custom parameters incomplete display #2628

eternalstop opened this issue Mar 13, 2024 · 1 comment · Fixed by #2631
Labels

Comments

@eternalstop
Copy link

Prerequisites

Description

I click "NEW" button to start new load test,When I have many custom parameters and expand "custom parameters",custom parameters incomplete display.
Snipaste_2024-03-13_17-27-15
Snipaste_2024-03-13_17-27-23

Command line

locust -f .\locust_test_file.py

Locustfile contents

# -*- coding: utf8 -*-
# code by ali 2024/3/13

from locust import HttpUser, constant, task, events


@events.init_command_line_parser.add_listener
def _handler_args(parser):
    my_choices = ["choices1", "choices2", "choices3", "choices4", "choices5",]

    parser.add_argument("--My-Parameter1", type=str, env_var="LOCUST_MY_ARGUMENT", default="choices1",
                        help="Parameter1",
                        choices=my_choices)
    parser.add_argument("--My-Parameter2", type=int, env_var="LOCUST_MY_ARGUMENT", default=1024, help="Parameter2")
    parser.add_argument("--My-Parameter3", type=int, env_var="LOCUST_MY_ARGUMENT", default=1, help="Parameter3")
    parser.add_argument("--My-Parameter4", type=int, env_var="LOCUST_MY_ARGUMENT", default=-1,
                                   help="Parameter4")
    parser.add_argument("--My-Parameter5", type=int, env_var="LOCUST_MY_ARGUMENT", default=100,
                                   help="Parameter5")
    parser.add_argument("--My-Parameter6", type=float, env_var="LOCUST_MY_ARGUMENT", default=0.1,
                                 help="Parameter6",
                                 choices=[0.1, 0.3, 0.5, 0.8, 1.0, 1.5, 2.0, 5.0])
    parser.add_argument("--My-Parameter7", type=float, env_var="LOCUST_MY_ARGUMENT", default=1.0,
                                 help="Parameter7",
                                 choices=[1.0, 1.5, 1.8, 2.0, 3.0, 5.0, 10.0])


class UserA(HttpUser):
    wait_time = constant(600)

    # host = "https://example.com"

    @task
    def get_root(self):
        self.client.get("/", name="UserA")

Python version

3.12.2

Locust version

2.24.0

Operating system

Windows 11

@cyberw
Copy link
Collaborator

cyberw commented Mar 13, 2024

@andrewbaldwin44 is this something you could take a look at?

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.

2 participants