What is k6
A testing tool to verify the system's loading tolerance. By applying k6, developers can measure the limited amount of requests that the system can handle.
Developers will likely adopt k6 for projects that are reaching the last stages before deploying for production. It helps to benchmark the server to see how many users/requests we can handle to plan to scale or maintain the system.
How it works
Though k6 is written in Go, its scripts are made out of Javascript. With the powerful code-based scripting from JS, k6 was built to prioritize developers, developers, DevOps, SREs & Testers. The code-driven mechanism makes k6 developer-centric. It's easy to maintain and integrate k6 with the daily tools of developers such as GitHub, Grafana, VSCode, GraphQL.
How to install
k6 binaries are available for various platforms, so a language runtime is no longer necessary. The basic setup would be
$ brew install k6
Benefit stage
Testing
Why we look into k6
Previously, we didn't put too much focus into stress testing. Functional testing is still our main work, but our automation framework has been set up already. To expand our testing stack/practices, we shift our attention to k6 to simplify the stress testing process.
Also, k6 claims to be developer-centric, so the syntax, concept, and principle feel familiar, which helps to flatten a curve for newcomers.