Member-only story
K6 Performance Testing with Inbuilt Reporting and Dashboards
Why K6’s Dashboard is a Must-Have for Performance Testing?

New to k6? Let’s set it up first 🛋️
Installation
- MacOS —
brew install k6
- Windows (choco) —
choco install k6
- Docker —
docker pull grafana/k6
For latest & additional installation info, refer to k6 official doc
If you are behind the Medium paywall and can’t read this article, click here this publication is open to everyone.
Writing your first k6 load test (-_-)
Time to write the code!
k6 supports multiple protocols, but for now, let’s stick to HTTP. Your first script will do a basic HTTP POST request against a test API that will echo back whatever you send to it.
Any code in the
default
function is executed by each k6 virtual user when the test runs.
You could actually run this script already, and k6 would make the HTTP POST request, but how would you know if it worked? Here’s the check
function which will assert the response