Menu
Home Explore People Places Arts History Plants & Animals Science Life & Culture Technology
On this page
K6 (software)
Open-source load testing software

K6 is an open-source load testing tool developed by Grafana Labs. 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).

Related Image Collections Add Image
We don't have any YouTube videos related to K6 (software) yet.
We don't have any PDF documents related to K6 (software) yet.
We don't have any Books related to K6 (software) yet.
We don't have any archived web articles related to K6 (software) yet.

Features

  • 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

K6 was initially released by LoadImpact56 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

Example and usage

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.10

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

  • Free and open-source software portal

References

  1. "Grafana k6 | Grafana k6 documentation". Grafana Labs. Retrieved 2024-10-07. https://grafana.com/docs/k6/latest/

  2. "Load testing for engineering teams | Grafana k6". k6.io. Retrieved 2024-10-07. https://k6.io

  3. "Create Wikipedia page for K6 · Issue #104 · grafana/k6-docs". GitHub. Retrieved 2024-10-07. https://github.com/grafana/k6-docs/issues/104#issuecomment-341728583

  4. grafana/xk6, Grafana Labs, 2024-10-04, retrieved 2024-10-07 https://github.com/grafana/xk6

  5. "An... other load testing tool?". k6.io. Retrieved 2024-10-07. https://k6.io/blog/another-load-testing-tool/

  6. "Load Impact is now k6". loadimpact.com. Retrieved 2024-10-07. https://loadimpact.com/

  7. "LoadImpact is rebranding to k6". k6.io. Retrieved 2024-10-07. https://k6.io/blog/load-impact-rebranding-to-k6/

  8. Wiggers, Kyle (2021-06-17). "Grafana Labs acquires load-testing startup K6". VentureBeat. Retrieved 2024-10-07. https://venturebeat.com/business/grafana-labs-acquires-load-testing-startup-k6/

  9. "Testing Tools - Ranking | OSS Insight". ossinsight.io. Retrieved 2024-10-07. https://ossinsight.io/collections/testing-tools/

  10. "Create Wikipedia page for K6 · Issue #104 · grafana/k6-docs". GitHub. Retrieved 2024-10-07. https://github.com/grafana/k6-docs/issues/104#issuecomment-341728583