question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Test file can not be named locust.py (or any other name that is the same as an existing python package)

See original GitHub issue

Thanks 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:closed
  • Created 9 years ago
  • Comments:10 (2 by maintainers)

github_iconTop GitHub Comments

8reactions
bgenchelcommented, Jun 17, 2016

I have the error no matter what my file is named. ?

4reactions
heymancommented, Apr 6, 2014

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!

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found