K6 (software)
| k6 | |
|---|---|
| File:K6 software logo.svg | |
| Developer | Grafana Labs |
| Initial release | January 18, 2017 |
| Stable release | 1.3.0
/ September 23, 2025 |
| Repository | github |
| Written in | JavaScript, Go |
| Engine | |
| Operating system | Cross-platform |
| Type | Load testing |
| License | AGPL 3 |
| Website | k6 |
K6 is an open-source load testing tool developed by Grafana Labs.[1][2] It is designed to help developers and engineers test the performance and reliability of their systems, particularly APIs, microservices, and websites. K6 is both an HTTP load and functional test tool, written in Go and using the goja embedded JavaScript interpreter for test scripting purposes. Tests are written in ECMAScript 6 using the Babel transpiler. There is support for HTTP/2, TLS, test assertions, ramp up and down, duration, number of iterations etc. Standard metrics include reports to standard out but can include collectors that report to time-series databases which can be visualized in real-time. There is a Jenkins plugin that can be combined with thresholds (global pass/fail criteria).[3]
Features
[edit | edit source]- Developer-friendly: Uses JavaScript for scripting.
- Extensible: Can be extended with various modules and integrations.[4]
- Performance testing: Supports stress, spike, and soak tests.
- Automation-friendly: Integrates with CI/CD pipelines for continuous testing.
History
[edit | edit source]K6 was initially released by LoadImpact[5][6] in 2017. LoadImpact was later rebranded into k6 in 2020.[7] K6 was then acquired by Grafana Labs in 2021.[8] It has since become a popular tool for performance testing in the developer community.[9]
Grafana k6 1.0 was released on 2025-05-07 at GrafanaCON 2025. [10]
Example and usage
[edit | edit source]The below script executes a GET request on the Wikipedia homepage, checks whether the HTTP status code is 200 and if we are using the HTTP/2 protocol.[3]
import http from "k6/http";
import { check } from "k6";
export default function() {
check(http.get("https://www.wikipedia.org/"), {
"status is 200": (r) => r.status == 200,
"protocol is HTTP/2": (r) => r.proto == "HTTP/2.0",
});
}
The above test case can be run with the command $ k6 run http_2.js where http_2.js is the filename in which the test case is saved in.
See also
[edit | edit source]Lua error in mw.title.lua at line 392: bad argument #2 to 'title.new' (unrecognized namespace name 'Portal').
References
[edit | edit source]- ^ Lua error in Module:Citation/CS1/Configuration at line 2172: attempt to index field '?' (a nil value).
- ^ Lua error in Module:Citation/CS1/Configuration at line 2172: attempt to index field '?' (a nil value).
- ^ a b Lua error in Module:Citation/CS1/Configuration at line 2172: attempt to index field '?' (a nil value).
- ^ Lua error in Module:Citation/CS1/Configuration at line 2172: attempt to index field '?' (a nil value).
- ^ Lua error in Module:Citation/CS1/Configuration at line 2172: attempt to index field '?' (a nil value).
- ^ Lua error in Module:Citation/CS1/Configuration at line 2172: attempt to index field '?' (a nil value).
- ^ Lua error in Module:Citation/CS1/Configuration at line 2172: attempt to index field '?' (a nil value).
- ^ Lua error in Module:Citation/CS1/Configuration at line 2172: attempt to index field '?' (a nil value).
- ^ Lua error in Module:Citation/CS1/Configuration at line 2172: attempt to index field '?' (a nil value).
- ^ Lua error in Module:Citation/CS1/Configuration at line 2172: attempt to index field '?' (a nil value).
External links
[edit | edit source]