Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/andreasneuber/locust-python-example
Performance testing with Python - simple example.
https://github.com/andreasneuber/locust-python-example
locust locustio python
Last synced: 10 days ago
JSON representation
Performance testing with Python - simple example.
- Host: GitHub
- URL: https://github.com/andreasneuber/locust-python-example
- Owner: andreasneuber
- Created: 2023-12-08T18:24:00.000Z (about 1 year ago)
- Default Branch: master
- Last Pushed: 2023-12-11T21:41:41.000Z (about 1 year ago)
- Last Synced: 2024-11-09T17:34:19.378Z (2 months ago)
- Topics: locust, locustio, python
- Language: Python
- Homepage:
- Size: 3.91 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# locust-python-example
Sample implementation of Python Locust performance testing.## Application under test
The tests were written for https://github.com/andreasneuber/automatic-test-sample-site.
Readme in that repo has further details how to set it up.## IDE used
PyCharm## Setup
- Clone repo.
- In IDE click on interpreter info (usually) displayed in bottom right corner
- Add New Interpreter > Add Local Interpreter... > Virtualenv Environment: New > OK
- Activate virtual environment by calling the `activate` script. Windows: `.venv/Scripts/activate`
- In Powershell there should appear a `(.venv)` prefix now
- Then...
```
pip install -r requirements.txtlocust -V
```## Run tests via WebUI
Tests are located in `locustfile.py`Make sure you are in root folder of project, execute in terminal: `locust` then open http://localhost:8089/ in browser,
add http://localhost:8000 as host url.## Run tests in terminal
`locust -f locustfile.py --headless --host http://localhost:8000 --users 100 --spawn-rate 5`## CI
As a matter of principle - whatever can be run in terminal can be run in a pipeline ;-)## Docu
[https://docs.locust.io/en/stable/quickstart.html](https://docs.locust.io/en/stable/quickstart.html)