Menu
Open source

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:

CategoryMaintainerAuditedCloud support
OfficialGrafana Labs✅ Yes✅ Yes
CommunityCommunity✅ Yes⚠️ Partial*

* Partial cloud support means that the extensions can be used in the CLI with the --local-execution mode, and on Private Load Zones with a custom image. They don’t work on Grafana Cloud k6 Public Load Zones.

Official extensions

ExtensionDescriptionVersions
xk6-client-prometheus-remoteTest Prometheus Remote Write-compatible endpoints0.3.2
xk6-fakerGenerate fake data in your tests0.4.0, 0.4.1, 0.4.2, 0.4.3, 0.4.4
xk6-lokiTest Grafana Loki log ingestion endpoints1.0.0, 1.0.1
xk6-sqlTest SQL servers1.0.0, 1.0.1, 1.0.2, 1.0.3, 1.0.4, 1.0.5
xk6-sql-driver-mysqlSQL driver for MySQL0.1.0, 0.2.0, 0.2.1
xk6-sql-driver-postgresSQL driver for Postgres0.1.0, 0.1.1
xk6-sshUse SSH connections in your tests0.1.0, 0.1.1, 0.1.2, 0.1.3

Community extensions

Note

We’re working on a process for community folks to submit their extensions.

ExtensionDescriptionVersions
xk6-kafkaLoad test Apache Kafka1.0.0
xk6-sql-driver-azuresqlSQL driver for AzureSQL0.1.0, 0.1.1
xk6-sql-driver-clickhouseSQL driver for Clickhouse0.1.0, 0.1.1
xk6-sql-driver-sqlserverSQL driver for SQLite30.1.0, 0.1.1
xk6-sseTest with Server-Sent Events (SSE)0.1.10, 0.1.11

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.