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
- macOS
- Linux
- Windows
- Docker
- Binary
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.Browse extensions
Visit the k6 extensions catalog to find available extensions.
Build custom k6 binary
Use the k6 build service or build locally with xk6 to create a binary with your chosen extensions.
- 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:- Check the common installation issues guide
- Verify your system meets the requirements
- Check for permission issues when installing globally
- Try the Docker installation as an alternative
- Open an issue in the k6 GitHub repository
- Ask for help in the Grafana community forum
Configure your code editor
After installing k6, enhance your development experience by configuring your code editor:VS Code
Install k6 TypeScript definitions for IntelliSense:
JetBrains IDEs
Add k6 type definitions to enable auto-completion and documentation hints.
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