Add think time between steps
Medium70 pts~25 min
- Think time
- Pacing
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
Insert realistic pauses between user actions so load resembles real users.
Your task
- 1Set options { vus: 3, iterations: 9 }.
- 2GET BASE_URL + "/perf/search?q=tee", sleep(1), then GET BASE_URL + "/perf/checkout", sleep(1).
- 3check status 200 on both; optionally randomise with sleep(0.5 + Math.random()).
Acceptance criteria
- Search and checkout return 200
- sleep() is used
- ≥ 18 requests are sent
- At least 18 check() calls pass
k6 load testing · Performance Testing · Scripting basics