Udemy
Turn what you know into an opportunity and reach millions around the world.
Learn More
Your cart is empty.
Keep shopping
k6 Performance Testing: Load, Observability, CI/CD and AI
Role Play
New
2 students

k6 Performance Testing: Load, Observability, CI/CD and AI

Load test APIs and browsers with k6, find bottlenecks with Grafana and OpenTelemetry, gate CI, and use AI with k6 MCP
Created byTejasvi Hegde
Last updated 11/2026
English

What you'll learn

  • Explain latency, throughput, errors and saturation, and read percentiles instead of averages
  • Write k6 scripts with checks, thresholds, tags, groups, custom metrics and think time
  • Run smoke, load, stress, spike, breakpoint and soak tests and choose the right one for a question
  • Model a workload with open and closed models and arrival-rate executors, and avoid coordinated omission
  • Test real API flows with correlation, authentication, test data and secrets, organised as a reusable framework
  • Load test GraphQL, gRPC and WebSockets, and run browser tests with k6 browser
  • Produce reports and dashboards, and send k6 results to Grafana with OpenTelemetry and Prometheus
  • Follow a slow request into the server with metrics, logs, traces and profiles, and find the bottleneck
  • Add performance gates to GitHub Actions and Jenkins pipelines and compare runs against a baseline
  • Run distributed tests on Kubernetes and in Grafana Cloud k6, and add fault injection
  • Build a production-grade k6 framework with checked settings, safe test data, traffic-mix workloads and evidence-based gates
  • Use AI assistants and the k6 MCP server to write, review and analyse tests, and check their output

Course content

29 sections • 273 lectures • 26h 14m total length
  • What you will build: a tested, observed, automated shop6:59
    See what performance testing asks, meet the two local apps we test (QuickPizza and SlowShop), and learn what tested, observed and automated mean in this course.
  • How to use this course, code download, the companion repo4:56
    Find your way around the course repository: one folder per section, a start copy and a final copy of every lesson file, and run logs to compare your output with.
  • What k6 is and where it fits (vs JMeter, Gatling, Locust)4:18
    Learn what k6 is made of (one Go program running JavaScript in its own engine), how it compares with JMeter, Gatling and Locust, and four questions for choosing a tool.
  • A short history of load testing: LoadRunner, JMeter, Gatling, Locust and k63:31
    Walk through LoadRunner, JMeter, Locust, Gatling and k6: what each replaced, which problem it solved, and where it still falls short.
  • k6 in 2026: what changed in v1 and v2, and why old tutorials break4:05
    Spot an outdated tutorial: what k6 v1 promised, what v2 removed (old cloud login and run commands, an executor), what is new, and why the help command is the truth.
  • A word of caution: only test what you own3:45
    Understand why permission separates a load test from an attack, what cloud providers allow, a five-point checklist before every test, and the public URL in generated scripts.
  • Course files and cheat sheets3:04
    Tour the reference files: the QuickPizza cheat sheet with its observed notes, the run notes, the which-test decision table and the annotated end-of-test summary.
  • Course files and downloads1:08
    Where to download the course code, the prompt library and the lesson notes, and how they are organised.
  • Quiz: Start here

Requirements

  • A computer with macOS, Windows or Linux that can run Docker Desktop (8 GB of RAM or more recommended)
  • Comfort typing commands in a terminal
  • Basic programming in any language; the JavaScript you need is taught in its own section
  • No performance testing experience needed; the concepts are taught from zero
  • Optional: a free Grafana Cloud account for the cloud section, and an AI coding assistant for the AI sections

Description

This course contains the use of artificial intelligence.

A hands-on k6 course built on k6 v2.4. You write load tests, run them against applications on your own machine, and then follow the slow requests into the server: the metrics, the logs, the traces and the profiles. By the end you can tell a team not only that p95 went up, but why, and you can stop a pull request that makes it worse.

What is in the course. 29 sections and 272 video lectures, about 26 hours of video, a quiz at the end of every section, hands-on assignments with solutions, five AI role plays where you practise defending performance decisions in a conversation, the complete code for every lesson, a section where you build a production-grade k6 framework step by step, and an extra section with a prompt library for performance testing. Every command is typed and run on screen, and the output you see is the real output.

The applications you test. QuickPizza, the official k6 demo app, runs locally in Docker for the script basics, the test types, HTTP flows, browser tests and other protocols. SlowShop is a Spring Boot shop API with Postgres and Redis, written for this course, with nine planted faults you can switch on and off; you find each one from a load test and the observability stack. You never load test a site you do not own.

What you will learn

  • Performance testing concepts: latency, throughput, errors and saturation, why averages lie, percentiles, SLIs, SLOs and error budgets

  • k6 scripting from the first request: the lifecycle, options, checks, think time, debugging, --once and --scenario, and TypeScript with no build step

  • Every test type done properly: smoke, load, stress, spike, breakpoint and soak, and which one to run when

  • Workload modelling: open and closed models, coordinated omission, the executors, arrival rates, dropped iterations and Little's law

  • Metrics, thresholds, tags and groups, and how to turn an SLO into a pass or fail gate

  • Real API flows: correlation, tokens, cookies, batches, uploads, test data, secrets, and a small k6 framework you can reuse

  • A production-grade k6 framework built step by step: checked settings, one login per virtual user, test data that does not collide, workloads from a traffic mix, journey measurement with traces, gates with evidence, run records and reports, the same framework in GitHub Actions and Jenkins, and a second application added without changing the shared code

  • Other protocols: GraphQL, gRPC, WebSockets and k6 extensions

  • k6 browser: locators, web vitals, and mixing browser and protocol load in one test

  • Outputs and reports, including the built-in web dashboard and an HTML report a manager can read

  • Observability with Grafana, Prometheus, Loki, Tempo, Pyroscope and OpenTelemetry: metrics, logs, traces and profiles tied to one test run

  • A bottleneck hunting lab on SlowShop, then capacity and scaling

  • k6 in CI/CD with GitHub Actions and Jenkins: performance gates on pull requests and baseline comparison

  • Grafana Cloud k6, distributed tests on Kubernetes with the k6 operator, and fault injection

  • AI for writing and reviewing k6 tests and for analysing results, with Claude Code and the k6 MCP server, and how to check what the AI gives you

How the course is built. Each idea is explained first, then coded and run. The installs are shown on camera (k6, VS Code, Node.js, Docker, Git, Java, Python, Jenkins, kind, kubectl and Helm). Everything runs on your own computer; a free Grafana Cloud account is only needed for the cloud section, and an AI assistant only for the AI sections.

All the code is included. Every lesson's start and finished code, both practice apps, the framework, the pipelines, the Kubernetes setup and every assignment with its solution are in a public GitHub repository, linked in the first section.

A note on versions. k6 changed a lot in v1 and v2: some commands and outputs used in older tutorials no longer exist. This course uses k6 v2.4 and shows what changed, so you can also read older material with care.

Who this course is for:

  • QA and test engineers moving into performance testing
  • Developers and SREs who need to load test their own services and find the bottleneck
  • Testers who used JMeter, Gatling or Locust and want to learn k6
  • DevOps engineers who want performance checks in their CI/CD pipelines
  • Anyone who learnt older versions of k6 and wants to catch up with k6 v2