k6
Installation
SKILL.md
k6
k6 is a developer-centric, open-source load testing tool suitable for testing APIs, microservices, and websites. It is written in Go but you script tests in JavaScript.
When to Use
- Developer-Centric Load Testing: Writing high-performance load tests in modern JavaScript / TypeScript with CLI execution.
- CI/CD Performance Regression Gates: Defining thresholds (
http_req_duration: ['p(95)<200']) that automatically fail build pipelines on regressions. - Spike, Stress & Soak Testing: Simulating traffic surges, system breaking points, and prolonged sustained load over hours.
- Cloud Distributed Load Generation: Running distributed tests across global regions via Grafana Cloud k6.
Quick Start
import http from "k6/http";
import { sleep, check } from "k6";