Skip to content

Commit 67ea7d4

Browse files
committed
add locust example
1 parent 75ecbca commit 67ea7d4

File tree

3 files changed

+20
-0
lines changed

3 files changed

+20
-0
lines changed

Makefile

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -128,3 +128,10 @@ codegen: ## generate test code
128128
uv run playwright codegen \
129129
--target python-pytest \
130130
--output tests/test_codegen.py
131+
132+
.PHONY: locust
133+
locust: ## run locust server running on localhost:8089
134+
uv run locust \
135+
--locustfile scripts/locustfile.py \
136+
--host http://localhost:8888 \
137+
--web-port 8089

docs/index.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,10 @@ uv run scripts/load_context.py
6666

6767
## [Playwright MCP server](https://github.com/microsoft/playwright-mcp)
6868

69+
## [Locust](https://github.com/locustio/locust)
70+
71+
- [Your first test](https://docs.locust.io/en/stable/quickstart.html)
72+
6973
## Custom apps
7074

7175
### Credentials

scripts/locustfile.py

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
from locust import HttpUser, task
2+
3+
4+
class HelloWorldUser(HttpUser):
5+
@task
6+
def hello_world(self):
7+
self.client.get(
8+
url="/",
9+
)

0 commit comments

Comments
 (0)