Skip to main content

Install k6

k6 has packages for Linux, Mac, and Windows. Alternatively, you can use a Docker container or a standalone binary.
You can also use k6 Studio, a desktop application that helps you generate k6 scripts from browser recordings without writing code. Learn more in the k6 Studio section.

Choose your platform

Install k6 using Homebrew:
brew install k6
Verify the installation:
k6 version

Upgrade k6

To upgrade to the latest version:
brew upgrade k6

Using k6 extensions

If you want to use k6 extensions to add support for additional protocols or features, you need a k6 binary built with your desired extensions.
1

Browse extensions

Visit the k6 extensions catalog to find available extensions.
2

Build custom k6 binary

Use the k6 build service or build locally with xk6 to create a binary with your chosen extensions.
3

Replace standard k6

Use your custom k6 binary instead of the standard installation.
Popular extensions include:
  • xk6-kafka: Test Kafka producers and consumers
  • xk6-sql: Query databases directly
  • xk6-browser: Enhanced browser testing capabilities
  • xk6-disruptor: Inject faults in Kubernetes for chaos testing

k6 Studio

k6 Studio is a desktop application for Windows, macOS, and Linux that helps you generate k6 scripts from browser recordings without writing code.

Features

  • Generate protocol and browser test scripts from recordings
  • Test and debug scripts with a visual interface
  • No coding required for basic test creation

Installation

Refer to the k6 Studio installation guide for instructions.
k6 Studio and k6 CLI are separate tools. You can use k6 Studio to generate scripts and k6 CLI to run them.

Troubleshooting

If you encounter installation issues:
  1. Check the common installation issues guide
  2. Verify your system meets the requirements
  3. Check for permission issues when installing globally
  4. Try the Docker installation as an alternative
If your problem persists:

Configure your code editor

After installing k6, enhance your development experience by configuring your code editor:

VS Code

Install k6 TypeScript definitions for IntelliSense:
npm install --save-dev @types/k6

JetBrains IDEs

Add k6 type definitions to enable auto-completion and documentation hints.
Learn more in the Configure your code editor guide.

Next steps

Now that you have k6 installed:

Write Your First Test

Create and run your first k6 test script

Understanding Results

Learn how to interpret k6 metrics and output

Build docs developers (and LLMs) love