Like unit testing, for performance

k6 is a developer-centric open source load testing tool for testing the performance of your backend. It’s built with Go and scriptable in ES6 JS and integrates well into your development and automation workflow, so you can stay on top of performance without fuzz.

Why we built k6

Why we built k6 and how it fits into our goals with our next generation service


We wanted an open source developer-centric load testing tool with flexible and powerful scripting, modern command line UX and good automation support. We didn't find such a tool available on the market, so we built k6.

Open source and community

We believe great developer tools should be open source and come with great documentation, allowing for a community to form around the tool. Visit the Github repo to see the code, roadmap and issues.

Automation native

k6 is built to integrate into your development environment as well as your CI or automation environment. That's why k6 is a command-line tool with features like custom metrics, checks (like asserts) and thresholds as well as several result output options.

Run performance tests from anywhere

Your test scripts work unchanged across single and multi machine (cloud) execution

k6 CLI

Your computer

Run tests from your local machine to test debug a script or to get quick performance feedback before pushing code to version control and CI.


Run tests from on-premise machines or cloud servers under your own AWS, Azure or GCP account.

Managed, globally distributed (beta)

For convenience or to scale out, you can move your scripts without changes to run on Load Impact's global cloud infrastructure.

Based on familiar and powerful ES6 JavaScript


Create ES6 JS modules that can be reused across tests and teams to build a foundational performance testing library for your organization.

Checks and Thresholds

Checks (like asserts) are used to validate functional aspects of your test. Thresholds is the essential feature that you use to specify the pass/fail criteria of your tests. You can create thresholds based on any of the standard metrics collected by k6, as well as any custom metrics that you define.

HTTP/1.1, HTTP/2 and WebSocket

Ready for the present and future k6 supports performance testing systems that talk HTTP/1.1 HTTP/2 and WebSocket.

Batteries included standard library

Besides the standard ES6 JS APIs, k6 comes bundled with APIs to handle Cookies, Crypto, Encodings, Environment variables, HTML forms, HTML parsing, Multipart requests, TLS client certificates, TLS ciphers & versions and more.


import http from "k6/http";
import { group, sleep, check } from "k6";

// Get login credentials from env vars
let email = __ENV.EMAIL;
let password = __ENV.PASSWORD;

export default function() {
    // Login to get API session token
    let res ="",
        JSON.stringify({ email: email, password: password }),
        { headers: { "Content-Type": "application/json" } }


    // Extract API session token from JSON response
    let apiToken = res.json().token.key;

    // Use session token to make API requests
    res = http.get("",
        { headers: { "Authorization": "Token " + apiToken } }
    check(res, {
        "status is 200": (res) => res.status === 200,
        "content-type is application/json": (res) => res.headers['Content-Type'] === "application/json",
        "content OK": (res) => JSON.parse(res.body).hasOwnProperty('organizations')


Easy, platform native installation flow




  1. Install the latest k6 package:
    $ sudo apt-key adv --keyserver hkp:// --recv-keys 379CE192D401AB61
    $ echo "deb stable main" | sudo tee -a /etc/apt/sources.list
    $ sudo apt-get update
    $ sudo apt-get install k6
  2. Run your first k6 test:
    $ k6 run -u 1 -d 10s




  1. Install the latest k6 package:
    $ wget -O bintray-loadimpact-rpm.repo
    $ sudo mv bintray-loadimpact-rpm.repo /etc/yum.repos.d/
    $ sudo yum install k6
  2. Run your first k6 test:
    $ k6 run -u 1 -d 10s
  1. Install k6 using Homebrew:
    $ brew tap loadimpact/k6
    $ brew install k6
  2. Run your first k6 test:
    $ k6 run -u 1 -d 10s
  1. Download the latest k6 MSI installer
  2. Run the installer
  3. Run your first k6 test:
    $ k6 run -u 1 -d 10s

Integrate into your automation pipelines

Whether you run your tests from a machine that you manage or from the Load Impact cloud service you can easily integrate performance tests into your favorite CI tool like CircleCI, GitlabCI, TravisCI, JenkinsCI and TeamCity.