What actually goes inside a k6 script? 🤔
Every k6 load test has 3 parts:
1️⃣ Imports → http to send requests, sleep to pause
2️⃣ options → one object describes the whole test (vus: 10, duration: ’30s’)
3️⃣ default function → what each virtual user does, again and again
A few lines of JavaScript, and you can simulate real traffic on your API.
▶️ Run it: k6 run script.js
📺 Episode 2 of the k6 & Performance Testing series
🔔 Subscribe for more quick IT tips.
#k6 #LoadTesting #JavaScript #DevOps #API #Shorts