Official extensions
These are extensions owned and maintained by Grafana Labs, with support for a wide range of versions.Protocol extensions
k6/x/mqtt
MQTT protocol support with event-driven architecture, QoS levels, and SSL/TLS
k6/x/redis
Redis database interaction with promise-based async API
k6/x/sql
SQL database testing for PostgreSQL, MySQL, SQLite, and more
Browser and chaos testing
k6 browser
Browser automation and end-to-end testing with Playwright-compatible APIs
xk6-disruptor
Chaos testing through fault injection in Kubernetes environments
Output extensions
xk6-output-prometheus-remote
Send metrics to Prometheus via remote write protocol
xk6-output-influxdb
Export metrics to InfluxDB time-series database
Community extensions
These are extensions developed by the community, with support for specific versions.We’re working on a process for community folks to submit their extensions.
Popular community extensions
xk6-kafka
Apache Kafka producer and consumer for event streaming tests
xk6-faker
Generate realistic fake data for tests
xk6-websockets
Enhanced WebSocket support with additional features
xk6-dashboard
Real-time web-based dashboard for test execution
Using extensions
There are two ways to use extensions when running a k6 test script.Automatic extension resolution
Official and community extensions can be used without additional configuration. They are automatically resolved and loaded by k6 when you import them in your test script. Example with xk6-faker:For community extensions, enable them with an environment variable:
Limitations
- Only works with official and community extensions
- Output extensions aren’t supported
- Running scripts from stdin isn’t supported
- Only files with extensions
.js,.tsor.tarcan be used
Disable automatic resolution
You can disable this feature by setting the environment variable:Custom k6 binary
If you have developed your own k6 extension or want to use an extension that’s not available through automatic extension resolution, build a custom k6 binary. The process involves using the xk6 tool to compile k6 with your desired extensions included. Custom binaries give you the flexibility to incorporate any extension from the k6 ecosystem.Finding extensions
To discover more extensions:Browse GitHub topics
Search for repositories tagged with xk6 on GitHub.
Check the k6 community
Visit the k6 Community Forum for discussions about extensions.
Next steps
Build Custom Binary
Learn how to bundle extensions into k6
Create Extension
Build your own k6 extension
Protocol Extensions
Explore MQTT, Redis, and SQL extensions
xk6-disruptor
Try chaos testing with fault injection