1 - Setup Lab 5 - Infrastructure load test Lab 2 - Basic load test Lab 6 - Scale with the k6 Operator Lab 3 - Workload in rps k6 AI and wrap-up Introduction to reliability testing and k6 Setup your environment for the labs Run a simple k6 test Choosing the right model for your test Choosing the right model for your test Load test a DB and correlate your infrastructure tests Move to a distributed test on Kubernetes Demo, take-home exercises and Q&A
(runs on your machine and in CI import http from 'k6/http' Command-Line interface CLI export default function () { script.js http.get('https: • You write tests in JavaScript } • Supports modern protocols HTTP, WebSocket, gRPC $ k6 run script.js • Extensible using plugins (xk6) quickpizza.grafana.com')
Spike Does it work at minimal load? Holding at expected traffic level Where does it break? Does it survive a surge? Verifies system functionality under tiny traffic before running heavier tests. Assesses performance under normal and peak concurrent user activity. Pushes beyond normal limits to find breaking points and maximum capacity. Tests response and recovery during sudden, extreme traffic bursts. Minimal load Expected traffic Maximum capacity https://grafana.com/load-testing/types-of-load-testing Sudden surge
are running Stuck? Let us know! (optional) k6 installed (k6 version) Cloned the workshop repo (github.com/immavalls/cnd-norway-2026-k6-workshop) Compose stack is up k3d or kind and kubectl installed (for later labs)
test Virtual Users (VUs) Iteration Duration How many users are simulated One single run of the main function How long the test runs VU1 -> login -> request func() { Run test for 1 minute VU2 -> login -> request doSomething() VU3 -> login -> request doSomethingElse() ... doAFinalThing() }
A rule that's evaluated against the whole run export let options = { thresholds: { http_req_duration: ["p(95) Performs an assertion on each response Doesn't stop the test fails the test run }}; export default function () { const res = http.get("https: Checks 200"], quickpizza.com"); check(res, { 'status is 200': (r) } r.status 200 });
a test fails on: pull_request jobs: load-tests: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 - run: docker compose up -d /-wait - uses: grafana/setup-k6-action@v1 # exits non-zero if a threshold fails - run: k6 run loadtest.js
agent integration, skills, and configuration for your AI workflow of choice k6 x agent k6 x mcp k6 x docs Brings MCP server to k6, agents can run k6 and interpret results natively. Programmatic access to k6 documentation via CLI.