Future / To Explore
Topics that belong in this track but are not written yet. Each one is a page I plan to add once I have used it on a real project. Until then, the official docs are the best source.
Table of Contents
- Grafana + InfluxDB/Prometheus Output
- Distributed Runs (k6-operator)
- CI
- The Browser Module
- k6 Cloud
- Extensions (xk6)
Grafana + InfluxDB/Prometheus Output
The --out json and --out csv flags used on page 09 are fine for a single report, but they do not give you a live dashboard while a long test is running. k6 can stream results to a time-series database as the test runs (--out experimental-prometheus-rw for Prometheus remote write, or an InfluxDB output) and a Grafana dashboard reads from there instead of waiting for the summary. Worth it once a test runs long enough that watching it live matters, or when the same dashboard needs to show a k6 run next to application metrics.
Distributed Runs (k6-operator)
Every script in this track runs from one machine. That is enough for the VU counts here, but a test that needs more load than a single machine can generate — or that must originate from several regions — needs multiple k6 instances coordinated as one run. k6-operator does that on Kubernetes, splitting a script across pods and aggregating the results. Worth exploring once a target's expected peak load outgrows a laptop or a single CI runner.
CI
None of the scripts here run in a pipeline yet. On GitHub Actions, Grafana publishes grafana/setup-k6-action to install k6 and grafana/run-k6-action to run a script, used together as two workflow steps. On GitLab CI, the equivalent is a job that uses the grafana/k6 Docker image directly and runs k6 run as the script step. Either way, a script that exits non-zero on a failed threshold (see page 06) is what makes this a real CI gate rather than a report nobody reads.
- Docs: https://grafana.com/docs/k6/latest/testing-guides/automated-performance-testing/
- GitHub Actions: https://github.com/grafana/setup-k6-action, https://github.com/grafana/run-k6-action
The Browser Module
k6/browser runs real Chromium under k6, so a script can drive a UI the same way Playwright does while still using k6's VU/iteration model and thresholds. It sits between this track and the Playwright track — useful for a flow that only exists in the browser (client-side rendering, a third-party widget) but still needs to be load tested. Heavier than an API script, so I reach for it only when there genuinely is no API to hit directly.
k6 Cloud
Grafana's hosted service runs the same scripts at a scale a laptop or a single CI runner cannot, with a hosted dashboard, historical trend comparison, and geographically distributed load generators. Worth it once a stress or endurance run needs more capacity than local infrastructure gives, or when results need sharing with people who should not need k6 installed to read them.
Extensions (xk6)
Core k6 does HTTP, WebSocket and a handful of built-in protocols. xk6 is the build tool that compiles a custom k6 binary with extra modules bundled in — gRPC, Kafka, SQL drivers, and community-maintained protocol support that is not in core. Worth it the day this track needs to load test something core k6 cannot speak natively.
Watching the Server
k6 numbers tell you what the user felt, not why. The Monitoring module sends k6 results to Prometheus and shows them on one Grafana dashboard beside the server's CPU, memory and database activity.