Test file can not be named locust.py (or any other name that is the same as an existing python package)
See original GitHub issueThanks for writing the locust test tool. It’s very interesting!
I follow the instruction on http://locust.io/, first I installed
pip install locustio
pip install pyzmq
Then I copied and pasted the sample “Simple example” to locust.py in my local directory and run it against a server listening on another PC (10.3.0.3) as the following but got error:
locust -f locust.py -H http://10.3.0.3
[2014-04-04 12:03:28,901] john-HP/ERROR/locust.main: No Locust class found!
Not sure what have gone wrong.
Thanks.
Issue Analytics
- State:
- Created 9 years ago
- Comments:10 (2 by maintainers)
Top Results From Across the Web
Writing a locustfile — Locust 2.14.0 documentation
A locust file is just a normal Python module, it can import code from other files or packages. class QuickstartUser(HttpUser):. Here we define...
Read more >Pytest/Locust: ModuleNotFoundError No module named
I would add a pytest.ini file and add a setting called pythonpath. This will let you point to the location of amapitest for...
Read more >Quick Tutorial on Locust
We have created a simple “locust file”, locustfile.py. ... A locust file is just a normal Python module, it can import code from...
Read more >Load Testing with Locust (Part 1) | by Beau Lyddon
To run Locust you will need either Python 2.7.x or any version of Python 3 above 3.3. If you do not have a...
Read more >Load testing with Locust | Promptworks | Philadelphia
One of the nicest features of Locust is that configuration is done via "Plain Old Python." You simply create a file named locustfile.py...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I have the error no matter what my file is named. ?
Hi!
I believe you got this error because your locust test file is named locust.py. I just tested this and got the same error.
I’m marking this issue as a bug, and changing the name of it. In the meanwhile you can get it working by just renaming your test file (for example to locustfile.py).
Thanks for the report!