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

Docs: Missing locustfile.py in code structure example #1959

Closed
Hritik14 opened this issue Dec 13, 2021 · 2 comments
Closed

Docs: Missing locustfile.py in code structure example #1959

Hritik14 opened this issue Dec 13, 2021 · 2 comments
Labels

Comments

@Hritik14
Copy link

Describe the bug

In the following section, a locustfile.py is missing
https://github.com/locustio/locust/blame/abca230842661606e00433a0df91927ebf23ec9c/docs/writing-a-locustfile.rst#L625-L636

Expected behavior

There should be a locustfile.py which would import classes from locustfiles directory

Actual behavior

There's no locustfile.py in the docs

Steps to reproduce

(;) ; ls -l
total 0
drwxr-xr-x  3 neo  wheel   96 Dec 13 17:22 common
drwxr-xr-x  3 neo  wheel   96 Dec 13 17:22 locustfiles
drwxr-xr-x  7 neo  wheel  224 Dec 13 17:21 venv
(;) ; tree -I venv
.
├── common
│   └── __init__.py
└── locustfiles
    └── locustfile.py

2 directories, 2 files
(;) ; locust
Could not find any locustfile! Ensure file ends in '.py' and see --help for available options.
(;) ;

Environment

  • OS: MacOS
  • Python version: Python 3.10.0
  • Locust version: locust 2.5.1
  • Locust command line that you ran: locust
  • Locust file contents (anonymized if necessary): no locustfile present, only locustfiles directory present
@Hritik14 Hritik14 added the bug label Dec 13, 2021
@cyberw
Copy link
Collaborator

cyberw commented Dec 13, 2021

The locustfiles are named api.py and website.py, but the hierarcy is just an example. I dont know what directory you are looking at...

@Hritik14
Copy link
Author

Perhaps, then, adding something like locust -f locustfiles/api.py would help understand that.
I assumed that locustfiles is a special directory name and will consider all the files inside as locustfiles automatically.

@cyberw cyberw closed this as completed in 73699f1 Dec 13, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants