Explore extensions
Extensions can be used to extend the core k6 features to fit your performance-testing use cases. There are two main categories of extensions: official and community.
Official extensions
These are extensions owned and maintained by Grafana Labs, with support for a wide range of versions.
Extension | Description | Versions |
---|---|---|
k6 | A modern load testing tool, using Go and JavaScript | v1.3.0, v1.2.3, v1.2.2, v1.2.1, v1.2.0, v1.1.0, v1.0.0 |
xk6-faker | Generate fake data in your tests | v0.4.4, v0.4.3, v0.4.2, v0.4.1, v0.4.0 |
xk6-loki | Test Grafana Loki log ingestion endpoints | v1.0.1, v1.0.0 |
xk6-client-prometheus-remote | Test Prometheus Remote Write-compatible endpoints | v0.3.2 |
xk6-sql | Load-test SQL Servers | v1.0.5, v1.0.4, v1.0.3, v1.0.2, v1.0.1, v1.0.0 |
xk6-sql-driver-mysql | xk6-sql driver extension for MySQL database support | v0.2.1, v0.2.0, v0.1.0 |
xk6-sql-driver-postgres | xk6-sql driver extension for Postgres database support | v0.1.1, v0.1.0 |
xk6-ssh | Use SSH connections in your tests | v0.1.3, v0.1.2, v0.1.1, v0.1.0 |
Community extensions
These are extensions developed by the community, with support for specific versions.
Note
We’re working on a process for community folks to submit their extensions.
Extension | Description | Versions |
---|---|---|
xk6-kafka | Load test Apache Kafka. Includes support for Avro messages. | v1.0.0 |
xk6-sql-driver-azuresql | xk6-sql driver extension for Microsoft Azure SQL database support | v0.1.1, v0.1.0 |
xk6-sql-driver-clickhouse | xk6-sql driver extension for ClickHouse database support | v0.1.1, v0.1.0 |
xk6-sql-driver-sqlserver | xk6-sql driver extension for Microsoft SQL Server database support | v0.1.1, v0.1.0 |
xk6-sse | Server Sent Event | v0.1.11, v0.1.10 |
Use extensions
There are two ways to use extensions when running a k6 test script.
Automatic extension resolution
These extensions can be used in your test without any additional configuration. They are automatically resolved and loaded by k6 when you import them in your test script.
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, you have to 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.
Refer to build a custom k6 binary guide to learn how to create your own k6 binary with custom extensions.
Caution
Many other extensions maintained by members of the k6 ecosystem are available in GitHub. These extensions aren’t maintained nor audited by Grafana Labs.