Extensions support in Grafana Cloud k6
We are excited to announce the public preview of k6 extensions in Grafana Cloud k6.
k6 extensions are libraries that expand the k6 core functionality. For example, the faker k6 extension enables users to generate random fake data, which is not available on k6 by default. Extensions allow the k6 open source project to remain small and focused on its core functionality, but still provide users with a way to add new features to cover any use case, such as supporting a new network protocol.
You can now seamlessly import and use a pre-approved set of k6 extensions in your Grafana Cloud k6 tests. Here is an example script that uses the k6/x/faker
extension:
import faker from "k6/x/faker";
export const options = {
cloud: {
name: 'Extensions in Grafana Cloud k6',
},
}
export default function () {
console.log(faker.person.firstName());
}
We also display the versions of k6 and extensions that your test runs are using, with links that take you to the source code, to help you debug issues faster.
Refer to the docs to learn about how to leverage this feature and what extensions are initially available in the cloud.