-
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
No Tasks executed when mirgrating to config #2987
Comments
Hey @vkuehn, in your configuration file you have two arguments stated; So in order for you test to run, you will either need to start three workers, or you can remove these flags and run in standalone. If you are still having trouble or have any questions, feel free to reach out to us on slack! |
@andrewbaldwin44 thanks for that. It actually did start but was than not executing any task and complain. locust.user.task: No tasks defined on LocalUser. Use the @task decorator or set the 'tasks' attribute of the User (or mark it as abstract = True if you only intend to subclass it) can you kindly reopen the issue and consider changing the docs for less effort when showing the local.conf ? |
ok this minimal file did work. As I have used tags in the config file which did not exist in the local.py locustfile = load_basics.py you can leave it closed @andrewbaldwin44 thanks |
Awesome! PRs are welcome if you think something is unclear in the docs! |
Prerequisites
Description
locust --headless --users 10 --spawn-rate 1 -H http://localhost:3000
locustfile.py looks like that
from locust import HttpUser, task
class HelloWorldUser(HttpUser):
@task
def hello_world(self):
self.client.get("/health")
but putting the same code in a local.py and this to a local.conf
locustfile = local.py
headless = true
master = true
expect-workers = 3
host = "http://localhost:3000"
users = 3
spawn-rate = 1
run-time = 1m
that command runs but does not bring back any results
locust --config local.conf
I have asked at stackeoverflow and read the documentation. No answer yet found so I guess it's a bug
Command line
locust --config local.conf
Locustfile contents
Python version
3.11.10
Locust version
2.32.1
Operating system
Mac OS 15.1 Build 24B83
The text was updated successfully, but these errors were encountered: