robotframework-locust
Website | PyPI | Keyword reference
A Robot Framework library that builds and runs Locust load tests. You write
the load as a Robot suite: the library creates the Locust users, runs them
headless and checks the stats with keywords. Locust Studio shows a run live,
and rflocust-k6 turns a k6 script into a Robot project.
Site and keyword reference: docs/index.html and docs/keywords.html,
served as the repo's GitHub page.
Contents
- Install
- Write a load suite
- Watch it in Locust Studio
- Convert a k6 script
- Safety limits
- Documentation
- For coding agents
- Contributing
- License
Install
Requires Python 3.11 or newer. Robot Framework 7.5 or newer and Locust (2.30 or newer, below 3) install with the library.
pip install robotframework-locust
pip install "robotframework-locust[studio]" # adds locust-studio
pip install "robotframework-locust[k6]" # adds rflocust-k6
From a checkout: uv sync, or pip install ..
Write a load suite
*** Settings ***
Library LocustLibrary
*** Test Cases ***
Home Page Under Load
Create Load Test https://test.example.com allowed_hosts=test.example.com
Set Wait Time 1s 3s
Add Get Request home / expected_status=200
Add Get Request health /health weight=2 expected_status=200, 204
Add Stop Rule p95 > 2s for 10s
Set Load Stages 30s:10 1m:10 15s:0
Run Load Test max_users=50
Should Have No Failures
Should Meet Response Time home p95 800ms
Export Report home-run
robot home_load.robot
The suite builds the users, runs them, then checks the numbers. Run Load Test
logs a stats table and sample calls, with secrets masked. Export Report writes
the Locust HTML report beside log.html.
The library has 28 keywords: user classes, pacing, stop rules, Python tasks, per-user numbers, data handed between users, and checks for response time, error rate and throughput. See docs/library.md.
Watch it in Locust Studio
locust-studio
Open a suite (Ctrl+O) and press Run (Ctrl+R). Studio runs the suite under Robot and updates the stats table and Locust's three charts every second. When the run ends, the Report tab opens the Robot log and the Locust report. Studio has a dark and a light theme and runs on Windows and Linux. See docs/studio.md.
Convert a k6 script
rflocust-k6 checkout.js --out robot
robot -v ENV:dev robot/tests
The converter reads the script's options with k6 inspect and scans its
functions for plain HTTP calls. Stages, thresholds and simple requests become
keywords. A function it cannot read becomes a Python task that raises
NotImplementedError until you port it, and a report lists each item as
mapped, approximate or hand port. The k6 binary must be on PATH.
k6 inspect runs the script's init code as you, so convert only scripts you
trust. See docs/k6-converter.md.
Safety limits
A load test can take a server down. These limits are built in:
- Run Load Test refuses a run above
max_users(default 100). - Create Load Test refuses a host that is not on
allowed_hosts. Add Stop Rule p95 > 1s for 10sandstop_on_fail_ratiostop a run early.expected_textfails a 200 that carries an error page.- The Locust web UI and distributed mode bind 127.0.0.1 only.
Read docs/safety.md before you point a run at a host you do not own.
Documentation
| Page | What it covers |
|---|---|
| docs/library.md | Writing suites, every keyword, Python tasks, reports |
| docs/safety.md | Every limit and how to set it |
| docs/studio.md | Locust Studio |
| docs/k6-converter.md | The k6 mapping, its limits, porting by hand |
| docs/cli.md | The commands and their options |
| docs/keywords.html | Keyword reference, built by libdoc |
| docs/references.md | Locust and Robot Framework sources |
| CHANGELOG.md | Changes per release |
For coding agents
.skills/using-locust-library/SKILL.md tells a coding agent how to write,
run and check a load suite with this library, with the safety limits first.
Copy the folder into your agent's skills folder to use it in another repo.
Contributing
See CONTRIBUTING.md for the setup, the checks and the rules a change must keep.
License
MIT. See LICENSE.
Metadata
Release files for robotframework-locust 1.0.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| robotframework_locust-1.0.2.tar.gz | 939.5 kB | With provenance | Details for robotframework_locust-1.0.2.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| robotframework_locust-1.0.2-py3-none-any.whl | Python 3 | none | any | Details for robotframework_locust-1.0.2-py3-none-any.whl |
Total release size: 1.9 MB
Release files / robotframework_locust-1.0.2.tar.gz
| Download URL | robotframework_locust-1.0.2.tar.gz |
|---|---|
| Size | 939.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
f6b3033c2a98a80859624b95af39a4f7ba746886b8f8a1e85f0310678c756dfc
|
|
BLAKE2b-256 checksum How to use checksums |
401cf137a2083f2b0d298b3961a5e6e916318787999bb48bb5a4b3de3d0bf59a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 20, 2026.
Transparency logRelease files / robotframework_locust-1.0.2-py3-none-any.whl
| Download URL | robotframework_locust-1.0.2-py3-none-any.whl |
|---|---|
| Size | 920.8 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
424c03e089a60989ea92c7965967350dd0ba79e2ed97e57b619229443d430e35
|
|
BLAKE2b-256 checksum How to use checksums |
db737a70ddb0108221313a11d95f83361262ad2e66d2b621d1176e95d4739da4
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 20, 2026.
Transparency logSecurity for robotframework-locust 1.0.2
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
Full provenance
Both files in this release have been uploaded with provenance metadata.
Attestation for robotframework_locust-1.0.2.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 20, 2026.
Transparency logA note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.