add reservations to the model
All checks were successful
Build and Publish / BuildAndDeployAmd64 (push) Successful in 46s
Build and Publish / BuildAndDeployArm64 (push) Successful in 4m48s

This commit is contained in:
matst80
2025-11-26 19:25:20 +01:00
parent 95426acd4a
commit 400079ec98
8 changed files with 461 additions and 433 deletions

View File

@@ -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!