Skip to content

Commit b79c90f

Browse files
Add release notes for v1.0, v1.1, and v1.2 releases (#2047)
1 parent b09c218 commit b79c90f

File tree

6 files changed

+952
-0
lines changed

6 files changed

+952
-0
lines changed
Lines changed: 120 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,120 @@
1+
---
2+
title: Version 1.0.0 release notes
3+
menuTitle: v1.0.0
4+
description: The release notes for Grafana k6 version 1.0.0
5+
weight: 9989
6+
---
7+
8+
# Version 1.0.0 release notes
9+
10+
<!-- md-k6:skipall -->
11+
12+
Grafana k6 v1.0 is here! 🎉
13+
14+
After 9 years of iteration and countless community contributions, we're thrilled to announce **Grafana k6 v1.0**.
15+
16+
While many features and capabilities in this release were introduced gradually in previous versions, **k6 v1.0 marks a turning point**: a commitment to stability, formal support guarantees, and transparency in how we evolve and develop the project from here. This milestone is more than a version number; it's about trust, reliability, and empowering you to test confidently.
17+
18+
## Thank you, k6 community! 🌍
19+
20+
This release wouldn't be possible without you:
21+
22+
- ⭐️ 27000+ GitHub stars.
23+
- 🧠 9000+ git commits.
24+
- 🤝 200+ contributors.
25+
- 🔁 Countless test runs of any scale, in every timezone.
26+
27+
It's been amazing to watch k6 grow from a simple load testing command-line tool into a comprehensive reliability tool, used by teams worldwide and supported by a passionate and dedicated community.
28+
29+
To everyone who filed bugs, built extensions and libraries, or championed k6:️
30+
**Thank you!** You've shaped what k6 is today. 🙇‍♂️
31+
32+
## What's New in k6 1.0?
33+
34+
### 1. Stability You Can Build On
35+
36+
-**Semantic Versioning**: k6 now follows [Semantic Versioning 2.0](https://semver.org/). Breaking changes will only happen in major releases, with prior deprecation warnings.
37+
- 🔒 **2-Year Support Guarantees**: Every major version will be supported with critical fixes for **at least two years**; upgrade on your schedule.
38+
- 📦 **Public API Surface**: We've established a clearly delineated and supported API surface for the k6 codebase. Extensions, integrations, and projects building on top of the k6 code now have a stable foundation to rely on.
39+
40+
🔎 Read more in our [versioning and stability guarantees](https://grafana.com/docs/k6/latest/reference/versioning-and-stability-guarantees/) guide.
41+
42+
### 2. First-Class TypeScript Support
43+
44+
Write type-safe and maintainable tests—no transpilation needed. Simply save your file with a `.ts` extension and run it directly using `k6 run script.ts`.
45+
46+
```typescript
47+
import http from 'k6/http';
48+
49+
// PizzaRequest defines the request body format the quickpizza API expects
50+
export interface PizzaRequest {
51+
maxCaloriesPerSlice: number;
52+
mustBeVegetarian: boolean;
53+
}
54+
55+
export default function () {
56+
const payload: PizzaRequest = {
57+
maxCaloriesPerSlice: 500, // Type-checked!
58+
mustBeVegetarian: true,
59+
}
60+
61+
http.post(
62+
'https://quickpizza.grafana.com/api/pizza',
63+
JSON.stringify(payload),
64+
{
65+
headers: {
66+
"Content-Type": "application/json",
67+
"Authorization": "Token " + "abcdef0123456789"
68+
} as Record<string, string>
69+
});
70+
}
71+
```
72+
73+
### 3. Extensions Made Simple
74+
75+
With k6 v1.0, extensions now work out of the box in `k6 cloud run` and `k6 cloud run --local-execution`. Support for `k6 run` is coming soon.
76+
77+
✅ No more xk6 toolchain.
78+
✅ No manual builds.
79+
✅ Import an extension's module and go.
80+
81+
```javascript
82+
import faker from 'k6/x/faker';
83+
84+
export default function () {
85+
console.log(faker.person.firstName());
86+
}
87+
```
88+
89+
To try the experimental feature, first enable its feature flag, then run it on Grafana Cloud with the following command:
90+
91+
```bash
92+
K6_BINARY_PROVISIONING=true k6 cloud run script.js,
93+
```
94+
95+
or if you want to run it locally and stream the results to Grafana Cloud then use:
96+
97+
```bash
98+
K6_BINARY_PROVISIONING=true k6 cloud run --local-execution script.js
99+
```
100+
101+
### 4. Revamped test summary
102+
103+
The new end-of-test summary makes it easier to **understand results and spot issues**:
104+
105+
* 📊 **Hierarchical output**: Metrics are grouped by scenario, group, and category.
106+
***Improved thresholds & checks**: Clearer layout for faster debugging.
107+
* 🔍 **Multiple summary modes**:
108+
* `compact` (default): big picture results, focusing on essentials.
109+
* `full`: full picture results, providing granularity.
110+
111+
```
112+
k6 run --summary-mode=full script.ts
113+
```
114+
115+
![end-of-test-summary](https://github.com/user-attachments/assets/02984ff9-6ed2-4eb2-9637-daf5058f2de6)
116+
117+
### 5. Quality of Life Upgrades
118+
119+
- Stable modules: `k6/browser`, `k6/net/grpc`, and `k6/crypto` are now production-ready.
120+
- Improved Grafana Cloud integration: Stream local test results to Grafana Cloud with `k6 cloud run --local-execution`.
Lines changed: 120 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,120 @@
1+
---
2+
title: Version 1.0.0 release notes
3+
menuTitle: v1.0.0
4+
description: The release notes for Grafana k6 version 1.0.0
5+
weight: 9989
6+
---
7+
8+
# Version 1.0.0 release notes
9+
10+
<!-- md-k6:skipall -->
11+
12+
Grafana k6 v1.0 is here! 🎉
13+
14+
After 9 years of iteration and countless community contributions, we're thrilled to announce **Grafana k6 v1.0**.
15+
16+
While many features and capabilities in this release were introduced gradually in previous versions, **k6 v1.0 marks a turning point**: a commitment to stability, formal support guarantees, and transparency in how we evolve and develop the project from here. This milestone is more than a version number; it's about trust, reliability, and empowering you to test confidently.
17+
18+
## Thank you, k6 community! 🌍
19+
20+
This release wouldn't be possible without you:
21+
22+
- ⭐️ 27000+ GitHub stars.
23+
- 🧠 9000+ git commits.
24+
- 🤝 200+ contributors.
25+
- 🔁 Countless test runs of any scale, in every timezone.
26+
27+
It's been amazing to watch k6 grow from a simple load testing command-line tool into a comprehensive reliability tool, used by teams worldwide and supported by a passionate and dedicated community.
28+
29+
To everyone who filed bugs, built extensions and libraries, or championed k6:️
30+
**Thank you!** You've shaped what k6 is today. 🙇‍♂️
31+
32+
## What's New in k6 1.0?
33+
34+
### 1. Stability You Can Build On
35+
36+
-**Semantic Versioning**: k6 now follows [Semantic Versioning 2.0](https://semver.org/). Breaking changes will only happen in major releases, with prior deprecation warnings.
37+
- 🔒 **2-Year Support Guarantees**: Every major version will be supported with critical fixes for **at least two years**; upgrade on your schedule.
38+
- 📦 **Public API Surface**: We've established a clearly delineated and supported API surface for the k6 codebase. Extensions, integrations, and projects building on top of the k6 code now have a stable foundation to rely on.
39+
40+
🔎 Read more in our [versioning and stability guarantees](https://grafana.com/docs/k6/latest/reference/versioning-and-stability-guarantees/) guide.
41+
42+
### 2. First-Class TypeScript Support
43+
44+
Write type-safe and maintainable tests—no transpilation needed. Simply save your file with a `.ts` extension and run it directly using `k6 run script.ts`.
45+
46+
```typescript
47+
import http from 'k6/http';
48+
49+
// PizzaRequest defines the request body format the quickpizza API expects
50+
export interface PizzaRequest {
51+
maxCaloriesPerSlice: number;
52+
mustBeVegetarian: boolean;
53+
}
54+
55+
export default function () {
56+
const payload: PizzaRequest = {
57+
maxCaloriesPerSlice: 500, // Type-checked!
58+
mustBeVegetarian: true,
59+
}
60+
61+
http.post(
62+
'https://quickpizza.grafana.com/api/pizza',
63+
JSON.stringify(payload),
64+
{
65+
headers: {
66+
"Content-Type": "application/json",
67+
"Authorization": "Token " + "abcdef0123456789"
68+
} as Record<string, string>
69+
});
70+
}
71+
```
72+
73+
### 3. Extensions Made Simple
74+
75+
With k6 v1.0, extensions now work out of the box in `k6 cloud run` and `k6 cloud run --local-execution`. Support for `k6 run` is coming soon.
76+
77+
✅ No more xk6 toolchain.
78+
✅ No manual builds.
79+
✅ Import an extension's module and go.
80+
81+
```javascript
82+
import faker from 'k6/x/faker';
83+
84+
export default function () {
85+
console.log(faker.person.firstName());
86+
}
87+
```
88+
89+
To try the experimental feature, first enable its feature flag, then run it on Grafana Cloud with the following command:
90+
91+
```bash
92+
K6_BINARY_PROVISIONING=true k6 cloud run script.js,
93+
```
94+
95+
or if you want to run it locally and stream the results to Grafana Cloud then use:
96+
97+
```bash
98+
K6_BINARY_PROVISIONING=true k6 cloud run --local-execution script.js
99+
```
100+
101+
### 4. Revamped test summary
102+
103+
The new end-of-test summary makes it easier to **understand results and spot issues**:
104+
105+
* 📊 **Hierarchical output**: Metrics are grouped by scenario, group, and category.
106+
***Improved thresholds & checks**: Clearer layout for faster debugging.
107+
* 🔍 **Multiple summary modes**:
108+
* `compact` (default): big picture results, focusing on essentials.
109+
* `full`: full picture results, providing granularity.
110+
111+
```
112+
k6 run --summary-mode=full script.ts
113+
```
114+
115+
![end-of-test-summary](https://github.com/user-attachments/assets/02984ff9-6ed2-4eb2-9637-daf5058f2de6)
116+
117+
### 5. Quality of Life Upgrades
118+
119+
- Stable modules: `k6/browser`, `k6/net/grpc`, and `k6/crypto` are now production-ready.
120+
- Improved Grafana Cloud integration: Stream local test results to Grafana Cloud with `k6 cloud run --local-execution`.
Lines changed: 99 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,99 @@
1+
---
2+
title: Version 1.1.0 release notes
3+
menuTitle: v1.1.0
4+
description: The release notes for Grafana k6 version 1.1.0
5+
weight: 9988
6+
---
7+
8+
# Version 1.1.0 release notes
9+
10+
<!-- md-k6:skipall -->
11+
12+
k6 `v1.1.0` is here 🎉! This release includes:
13+
14+
- New `count`, `nth`, `first`, and `last` methods for the browser module's Locator API [#4797](https://github.com/grafana/k6/pull/4797), [#4825](https://github.com/grafana/k6/pull/4825)
15+
- The `k6/experimental/webcrypto` module has been removed as its functionality is available globally.
16+
- Group results in the `full` end-of-test summary are now sorted as in code and properly indented.
17+
18+
## Breaking changes
19+
20+
*As per our [stability guarantees](https://grafana.com/docs/k6/latest/reference/versioning-and-stability-guarantees/),
21+
breaking changes across minor releases are allowed only for experimental features.*
22+
23+
### Breaking changes for experimental modules
24+
25+
#### Remove experimental `k6/experimental/webcrypto` module [#4851](https://github.com/grafana/k6/pull/4851)
26+
27+
The [WebCrypto API](https://grafana.com/docs/k6/latest/javascript-api/crypto/) has been available globally since `v1.0.0-rc1` (or `v0.58.0`), and now the experimental import (`k6/experimental/webcrypto`) is no longer available.
28+
29+
The required change for users is to remove the `import`; the rest of the code should work.
30+
31+
## New features
32+
33+
### New `count` method for the browser module's Locator API [#4797](https://github.com/grafana/k6/pull/4797)
34+
35+
The new `locator.Count` method returns the number of elements matching the `locator`. Unlike other Locator API methods, `locator.Count` returns the result immediately and doesn't wait for the elements to be visible.
36+
37+
```javascript
38+
import { expect } from "https://jslib.k6.io/k6-testing/0.4.0/index.js";
39+
import { browser } from 'k6/browser'
40+
41+
export const options = {
42+
scenarios: {
43+
ui: {
44+
executor: 'shared-iterations',
45+
options: {
46+
browser: {
47+
type: 'chromium',
48+
},
49+
},
50+
},
51+
},
52+
}
53+
54+
export default async function () {
55+
const page = await browser.newPage()
56+
await page.goto('https://quickpizza.grafana.com/login')
57+
58+
expect(await page.locator('input').count()).toEqual(3);
59+
60+
await page.close();
61+
}
62+
```
63+
64+
### New `nth`, `first` and `last` methods for the browser module's Locator API [#4825](https://github.com/grafana/k6/pull/4825)
65+
66+
The new Locator API methods, `nth`, `first`, and `last`, can select a single element from multiple elements matched by a `locator`. For example, selecting a single item from a catalogue of items on an e-commerce website. Because items in this catalogue generally change often and selecting an exact element may fail in future test runs, the new methods help to prevent flaky tests, leading to more reliable tests.
67+
68+
```javascript
69+
import { expect } from "https://jslib.k6.io/k6-testing/0.4.0/index.js";
70+
import { browser } from 'k6/browser'
71+
72+
export const options = {
73+
scenarios: {
74+
ui: {
75+
executor: 'shared-iterations',
76+
options: {
77+
browser: {
78+
type: 'chromium',
79+
},
80+
},
81+
},
82+
},
83+
}
84+
85+
export default async function () {
86+
const page = await browser.newPage()
87+
await page.goto('https://quickpizza.grafana.com')
88+
89+
await expect(await page.locator('p').first()).toContainText('QuickPizza');
90+
await expect(await page.locator('p').nth(4)).toContainText('QuickPizza Labs.');
91+
await expect(await page.locator('p').last()).toContainText('Contribute to QuickPizza');
92+
93+
await page.close();
94+
}
95+
```
96+
97+
---
98+
99+
For a full list of changes, including UX improvements and bug fixes, refer to [full release notes](https://github.com/grafana/k6/blob/master/release%20notes/v1.1.0.md).

0 commit comments

Comments
 (0)