-
Notifications
You must be signed in to change notification settings - Fork 1
Service: Locust
Claude Agent edited this page Apr 22, 2026
·
1 revision
Locust is an open source load testing tool written in Python. You define user behaviour in plain Python code and Locust can simulate millions of simultaneous users to stress-test your web application or API. It includes a real-time web UI to monitor requests per second, response times, and failure rates while a test is running.
Launch a Locust instance from the OSC dashboard.
- An OSC account. Sign up here.
- A
locustfile.pyhosted at a publicly accessible URL (e.g. a raw GitHub URL). This file defines the load test scenarios.
Create a locustfile.py that describes your test scenario:
from locust import HttpUser, task, between
class WebsiteUser(HttpUser):
wait_time = between(1, 5)
@task
def index(self):
self.client.get("/")
@task(3)
def about(self):
self.client.get("/about")Push this file to a public GitHub repository and copy the raw URL (e.g. https://raw.githubusercontent.com/myorg/myrepo/main/locustfile.py).
- Go to Locust on OSC.
- Click Create instance.
- Fill in:
- Name — alphanumeric identifier for the instance
-
LocustfileUrl — raw URL to your
locustfile.py
- Click Create.
osc create locustio-locust myloadtest \
-o LocustfileUrl="https://raw.githubusercontent.com/myorg/myrepo/main/locustfile.py"- Open the instance URL in your browser. The Locust web UI appears.
- Enter the Host (base URL of the system under test, e.g.
https://api.example.com). - Set the Number of users and Spawn rate.
- Click Start swarming.
- Monitor requests/sec, response times, and failures in real time on the Charts and Statistics tabs.
- Click Stop when the test is complete.