Add transactions and timers
Medium70 pts~25 min
- Transactions
- Groups
- Timers
Practice app · Checkout Service
A load-testable checkout service with realistic latency that degrades under concurrency, plus a live metrics view.
Your starter code already declares BASE_URL — call the API relative to it.
Objective
Group requests into named business transactions and time each transaction.
Your task
- 1Wrap login in group('login', …) and cart + checkout in group('purchase', …).
- 2Time each group with Date.now() before/after and check the purchase took < 2000 ms.
- 3check every request returns 200. Use { vus: 2, iterations: 6 }.
Acceptance criteria
- Login, cart and checkout return 200
- group() is used
- At least 12 check() calls pass
k6 load testing · Performance Testing · Scripting basics