Library › Book 5 › k6 -- The CI/CD Native Load Testing Tool
k6 -- The CI/CD Native Load Testing Tool
3.1🔒What Is k6?k6 is a developer-centric load testing tool written in Go with JavaScript scripting. It has become the industry standard for teams…
3.2🔒Your First k6 TestLet us start with the simplest possible k6 test and build from there:
3.3🔒Understanding k6 ConceptsA VU in k6 is a single execution thread running your test function in a loop. Each VU maintains its own state (cookies, variables) and…
3.4🔒k6 Executor Types -- Modeling Realistic TrafficUnderstanding executors is essential for modeling realistic traffic. The executor determines how k6 schedules VUs and iterations:
3.5🔒Complete k6 Lab: E-Commerce Load TestThis is a complete, production-ready k6 test that models realistic e-commerce traffic with multiple user personas:
3.6🔒Custom Metrics and Tagsk6 supports four types of custom metrics:
3.7🔒Data ParameterizationRealistic load tests require varied data. k6 provides several approaches:
3.8🔒Key Takeaways -- Chapter 31. k6 is a Go binary with JavaScript scripting -- no JVM, no dependencies. 2. Thresholds provide automated pass/fail for CI integration. 3…
3.9🔒Exercises -- Chapter 3Exercise 3.1 (Beginner): Write a k6 test that sends 100 GET requests to https://test-api.k6.io/public/crocodiles/ using the…
3.10🔒Career Translation- Implemented k6 load testing suites with CI-native threshold-based pass/fail, reducing production latency regressions by 60% within the…
3.11🔒Q&AInterview Depth CheckPrompt: You have a REST API where the search endpoint is latency-sensitive (SLO: p95 < 300ms) and the checkout endpoint is…