add reservations to the model
This commit is contained in:
14
k6/README.md
14
k6/README.md
@@ -18,10 +18,10 @@ This directory contains a k6 script (`cart_load_test.js`) to stress and observe
|
||||
|
||||
The script exercises (per iteration):
|
||||
|
||||
1. `GET /cart/` – ensure / fetch cart state (creates cart if missing; sets `cartid` & `cartowner` cookies)
|
||||
2. `POST /cart/` – add item mutation (random SKU & quantity)
|
||||
3. `GET /cart/` – fetch after mutations
|
||||
4. `GET /cart/checkout` – occasionally (~2% of iterations) to simulate checkout start
|
||||
1. `GET /cart` – ensure / fetch cart state (creates cart if missing; sets `cartid` & `cartowner` cookies)
|
||||
2. `POST /cart` – add item mutation (random SKU & quantity)
|
||||
3. `GET /cart` – fetch after mutations
|
||||
4. `GET /checkout` – occasionally (~2% of iterations) to simulate checkout start
|
||||
|
||||
You can extend it easily to hit deliveries, quantity changes, or removal endpoints.
|
||||
|
||||
@@ -40,9 +40,9 @@ Example run:
|
||||
|
||||
```bash
|
||||
k6 run \
|
||||
-e BASE_URL=https://cart.prod.example.com/cart \
|
||||
-e BASE_URL=https://cart.k6n.net/cart \
|
||||
-e VUS=40 \
|
||||
-e DURATION=10m \
|
||||
-e DURATION=1m \
|
||||
-e RAMP_TARGET=120 \
|
||||
k6/cart_load_test.js
|
||||
```
|
||||
@@ -171,4 +171,4 @@ Feel free to request:
|
||||
- WebSocket / long poll integration (if added later)
|
||||
- Synthetic error injection harness
|
||||
|
||||
Happy load testing!
|
||||
Happy load testing!
|
||||
|
||||
Reference in New Issue
Block a user