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

Locust --config-users incompatibility with --headless #2792

Closed
2 tasks done
Hchanni opened this issue Jul 5, 2024 · 1 comment
Closed
2 tasks done

Locust --config-users incompatibility with --headless #2792

Hchanni opened this issue Jul 5, 2024 · 1 comment

Comments

@Hchanni
Copy link

Hchanni commented Jul 5, 2024

Prerequisites

Description

I'm trying to run config-users in my CLI using a JSON file that establishes a fixed user count for a class. However, it for some reason will only ramp to 1 user.

The JSON:

[
{
"user_class_name": "BasicHealthCheckScenario2",
"fixed_count": 15
},
]

Command line

locust -f ./locustfiles/user_classes/myfile.py --headless --config-users config2.json --host

Locustfile contents

from locust import FastHttpUser, constant_throughput, task

class BasicHealthCheckScenario(FastHttpUser):
    wait_time = constant_throughput(1)

    @task
    def health(self):
       self.client.get("/health")

Python version

3.9.6

Locust version

2.29.1

Operating system

Mac OS

@Hchanni Hchanni added the bug label Jul 5, 2024
@Hchanni
Copy link
Author

Hchanni commented Jul 5, 2024

Figured out the issue is that if you don't define your user count with the -u it auto defaults to 1.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants