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: official and community.

Official extensions

These are extensions owned and maintained by Grafana Labs, with support for a wide range of versions.

ExtensionDescriptionVersions
k6A modern load testing tool, using Go and JavaScriptv1.3.0, v1.2.3, v1.2.2, v1.2.1, v1.2.0, v1.1.0, v1.0.0
xk6-fakerGenerate fake data in your testsv0.4.4, v0.4.3, v0.4.2, v0.4.1, v0.4.0
xk6-lokiTest Grafana Loki log ingestion endpointsv1.0.1, v1.0.0
xk6-client-prometheus-remoteTest Prometheus Remote Write-compatible endpointsv0.3.2
xk6-sqlLoad-test SQL Serversv1.0.5, v1.0.4, v1.0.3, v1.0.2, v1.0.1, v1.0.0
xk6-sql-driver-mysqlxk6-sql driver extension for MySQL database supportv0.2.1, v0.2.0, v0.1.0
xk6-sql-driver-postgresxk6-sql driver extension for Postgres database supportv0.1.1, v0.1.0
xk6-sshUse SSH connections in your testsv0.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.

ExtensionDescriptionVersions
xk6-kafkaLoad test Apache Kafka. Includes support for Avro messages.v1.0.0
xk6-sql-driver-azuresqlxk6-sql driver extension for Microsoft Azure SQL database supportv0.1.1, v0.1.0
xk6-sql-driver-clickhousexk6-sql driver extension for ClickHouse database supportv0.1.1, v0.1.0
xk6-sql-driver-sqlserverxk6-sql driver extension for Microsoft SQL Server database supportv0.1.1, v0.1.0
xk6-sseServer Sent Eventv0.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.