Simple load-testing examples using Grafana k6.
- k6: Install from the official docs: k6 installation guide
- Verify install:
k6 version
- Verify install:
From the project directory:
# Minimal example
k6 run firstTest.js
# Constant VUs example (5 VUs for 10s as defined in the script)
k6 run Test2.js
# Override VUs and duration from CLI if desired
k6 run -u 10 -d 30s Test2.js- Results print to the console by default (iteration count, request metrics, summaries).
- You can customize scenarios, thresholds, tags, and output backends; see the k6 documentation.