feat(workflow): living-server supervises the locust UI, locust load test and coverage gate
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -20,6 +20,39 @@ Run the suite (105 route-level integration tests, real stack, no mocks):
|
||||
make -f example/example.mk example-test
|
||||
```
|
||||
|
||||
## Load test (Locust, full integration)
|
||||
|
||||
`example/locustfile.py` hits literally every route: all GETs, all POSTs,
|
||||
and the file PUTs, including the `/routing/*` prefix and parameterized
|
||||
routes (`/hello/{name}`, `/di/resolve/{name}`, `/tenancy/t/{tenant}/whoami`,
|
||||
`/governance/keys/{id}/revoke`, ...). Start the server, then:
|
||||
|
||||
```sh
|
||||
pip install locust
|
||||
locust -f example/locustfile.py --host http://127.0.0.1:8080
|
||||
```
|
||||
|
||||
Open the Locust web UI at `http://localhost:8089` (linked as `locust` in
|
||||
the index matrix on `/`). Or headless:
|
||||
|
||||
```sh
|
||||
make -f example/example.mk example-locust
|
||||
```
|
||||
|
||||
The make target first runs the reproducible coverage gate
|
||||
(`example/check_locust_coverage.py`), which enumerates every
|
||||
`add_feature` index route plus every router registration, applies
|
||||
fill/prefix normalization, and fails on gaps. Expected output:
|
||||
|
||||
```
|
||||
routes=112 urls=176 methods=['get', 'options', 'post', 'put']
|
||||
OK: 112/112 routes covered, methods ['get', 'options', 'post', 'put']
|
||||
```
|
||||
|
||||
`/ws/chat` is exercised three ways: POST echo, HTTP upgrade-header
|
||||
probe, and a true websocket roundtrip via `ChatWebsocketUser`
|
||||
(`websocket-client`: open `ws://host/ws/chat`, send/recv, close).
|
||||
|
||||
## Framework status
|
||||
|
||||
The framework is skeletal: `example/fw/` holds a compiling skeleton of the
|
||||
|
||||
Reference in New Issue
Block a user