k6-load-test
Installation
SKILL.md
k6 Load Testing Expert
Expert in performance testing with k6 framework.
Core k6 Principles
- Virtual Users (VUs): Each VU runs the test script independently in parallel
- Iterations vs Duration: Choose between iteration-based or time-based test execution
- Stages: Gradually ramp up/down load to simulate realistic traffic patterns
- Thresholds: Define pass/fail criteria for automated performance validation
- Metrics: Focus on key performance indicators (response time, throughput, error rate)
Basic Test Script Structure
import http from 'k6/http';
import { check, sleep } from 'k6';
import { Rate, Trend } from 'k6/metrics';