Extensions and version support in Grafana Cloud k6
We are excited to announce the general availability of k6 extensions in Grafana Cloud k6.
You can now seamlessly use extensions from both Grafana Cloud and the k6 CLI:
- Local execution:
k6 run test.js
- Cloud execution:
k6 cloud run test.js
- Local execution, streaming test results:
k6 cloud run test.js --local-execution
You can try this test.js
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());
}
On top of it, you can also pin to specific versions of k6 and extensions in your script. For cloud-executed tests, this is only available for contracted customers. The previous test.js
example can be updated to:
"use k6 = 1.0.0";
"use k6 with k6/x/faker <= 0.4.3";
import faker from "k6/x/faker";
export const options = {
cloud: {
name: 'Extensions in Grafana Cloud k6 (Version overrides)',
},
}
export default function () {
console.log(faker.person.firstName());
}
Taking these examples to action:
There’s supposed to be a video here, but for some reason there isn’t. Either we entered the id wrong (oops!), or Vimeo is down. If it’s the latter, we’d expect they’ll be back up and running soon. In the meantime, check out our blog!
For more details on supported extensions and their versions, refer to Use k6 extensions and k6 versions.