|
| 1 | +# Grafana k6 v1.0 is here! 🎉 |
| 2 | + |
| 3 | +After 9 years of iteration and countless community contributions, we're thrilled to announce **Grafana k6 v1.0**. |
| 4 | + |
| 5 | +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. |
| 6 | + |
| 7 | +## Thank you, k6 community! 🌍 |
| 8 | + |
| 9 | +This release wouldn't be possible without you: |
| 10 | + |
| 11 | +- ⭐️ 27000+ GitHub stars. |
| 12 | +- 🧠 9000+ git commits. |
| 13 | +- 🤝 200+ contributors. |
| 14 | +- 🔁 Countless test runs of any scale, in every timezone. |
| 15 | + |
| 16 | +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. |
| 17 | + |
| 18 | +To everyone who filed bugs, built extensions and libraries, or championed k6:️ |
| 19 | +**Thank you!** You've shaped what k6 is today. 🙇♂️ |
| 20 | + |
| 21 | +## What's New in k6 1.0? |
| 22 | + |
| 23 | +### 1. Stability You Can Build On |
| 24 | + |
| 25 | +- ✅ **Semantic Versioning**: k6 now follows [Semantic Versioning 2.0](https://semver.org/). Breaking changes will only happen in major releases, with prior deprecation warnings. |
| 26 | +- 🔒 **2-Year Support Guarantees**: Every major version will be supported with critical fixes for **at least two years**; upgrade on your schedule. |
| 27 | +- 📦 **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. |
| 28 | + |
| 29 | +🔎 Read more in our [versioning and stability guarantees](https://grafana.com/docs/k6/latest/reference/versioning-and-stability-guarantees/) guide. |
| 30 | + |
| 31 | +### 2. First-Class TypeScript Support |
| 32 | + |
| 33 | +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`. |
| 34 | + |
| 35 | +```typescript |
| 36 | +import http from 'k6/http'; |
| 37 | + |
| 38 | +// PizzaRequest defines the request body format the quickpizza API expects |
| 39 | +export interface PizzaRequest { |
| 40 | + maxCaloriesPerSlice: number; |
| 41 | + mustBeVegetarian: boolean; |
| 42 | +} |
| 43 | + |
| 44 | +export default function () { |
| 45 | + const payload: PizzaRequest = { |
| 46 | + maxCaloriesPerSlice: 500, // Type-checked! |
| 47 | + mustBeVegetarian: true, |
| 48 | + } |
| 49 | + |
| 50 | + http.post( |
| 51 | + 'https://quickpizza.grafana.com/api/pizza', |
| 52 | + JSON.stringify(payload), |
| 53 | + { |
| 54 | + headers: { |
| 55 | + "Content-Type": "application/json", |
| 56 | + "Authorization": "Token " + "abcdef0123456789" |
| 57 | + } as Record<string, string> |
| 58 | + }); |
| 59 | +} |
| 60 | +``` |
| 61 | + |
| 62 | +### 3. Extensions Made Simple |
| 63 | + |
| 64 | +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. |
| 65 | + |
| 66 | +✅ No more xk6 toolchain. |
| 67 | +✅ No manual builds. |
| 68 | +✅ Import an extension's module and go. |
| 69 | + |
| 70 | +```javascript |
| 71 | +import faker from 'k6/x/faker'; |
| 72 | + |
| 73 | +export default function () { |
| 74 | + console.log(faker.person.firstName()); |
| 75 | +} |
| 76 | +``` |
| 77 | + |
| 78 | +To try the experimental feature, first enable its feature flag, then run it on Grafana Cloud with the following command: |
| 79 | + |
| 80 | +```bash |
| 81 | +K6_BINARY_PROVISIONING=true k6 cloud run script.js, |
| 82 | +``` |
| 83 | + |
| 84 | +or if you want to run it locally and stream the results to Grafana Cloud then use: |
| 85 | + |
| 86 | +```bash |
| 87 | +K6_BINARY_PROVISIONING=true k6 cloud run --local-execution script.js |
| 88 | +``` |
| 89 | + |
| 90 | +### 4. Revamped test summary |
| 91 | + |
| 92 | +The new end-of-test summary makes it easier to **understand results and spot issues**: |
| 93 | + |
| 94 | +* 📊 **Hierarchical output**: Metrics are grouped by scenario, group, and category. |
| 95 | +* ✅ **Improved thresholds & checks**: Clearer layout for faster debugging. |
| 96 | +* 🔍 **Multiple summary modes**: |
| 97 | + * `compact` (default): big picture results, focusing on essentials. |
| 98 | + * `full`: full picture results, providing granularity. |
| 99 | + |
| 100 | +``` |
| 101 | +k6 run --summary-mode=full script.ts |
| 102 | +``` |
| 103 | + |
| 104 | + |
| 105 | + |
| 106 | +### 5. Quality of Life Upgrades |
| 107 | + |
| 108 | +- Stable modules: `k6/browser`, `k6/net/grpc`, and `k6/crypto` are now production-ready. |
| 109 | +- Improved Grafana Cloud integration: Stream local test results to Grafana Cloud with `k6 cloud run --local-execution`. |
0 commit comments