k6 versions in Grafana Cloud
Grafana Cloud k6 uses the latest stable version of k6 and extensions to give users the right balance between access to the latest features and stability.
Which k6 version is being used in my tests?
You can view which version was used for a test run in the Test overview page for each of your tests. If your test is using extensions, you can view their versions by hovering over the version text.
There are two different ways the version numbers are displayed:
- The version number used in the test run matches a release, for example, a semantic versioning string such as
v1.0.0
. In this case, the exact release string is displayed. - The version number doesn’t match a release. In this case, you can see the
fast
tag, which indicates the latest stable commit of k6’smaster
branch.
The version numbers also link to the specific release or tag for the source repository for the k6 build or extension build. Knowing which version your test used when running in the cloud can be helpful for local debugging or for recreating the same test configuration in your CI/CD pipelines.
Override k6 versions and extension versions
You can pin to specific supported versions of k6 and extensions in your tests using semantic versioning. For k6 tests that execute in the cloud, you would need to be a contracted customer, so check your subscription before trying this out.
For example, the following script sets a specific version of k6 and the k6/x/faker
extension:
'use k6 = 1.0.0';
'use k6 with k6/x/faker <= 0.4.3';
import faker from 'k6/x/faker';
export default function () {
console.log(faker.person.firstName());
}
In this example, the k6
version is set to 1.0.0
, and k6/x/faker
is set to any version equal to or less than 0.4.3
. The versions displayed in the k6 output (Or Grafana Cloud UI if it’s a test executed in the cloud) should match these requirements.
All the released versions after v1.0.0
are supported (e.g. v1.1.0, v1.2.0).
- For a complete list of supported extensions and their versions, refer to Use k6 extensions
- For a complete list of version operators you can use, refer to the SemVer docs.