Update module go.k6.io/k6 to v1 #85
Open
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR contains the following updates:
v0.56.0
->v1.1.0
Release Notes
grafana/k6 (go.k6.io/k6)
v1.1.0
Compare Source
k6
v1.1.0
is here 🎉! This release includes:count
,nth
,first
, andlast
methods for the browser module's Locator API #4797, #4825k6/experimental/webcrypto
module has been removed as its functionality is available globally.full
end-of-test summary are now sorted as in code and properly indented.Breaking changes
As per our stability guarantees,
breaking changes across minor releases are allowed only for experimental features.
Breaking changes for experimental modules
Remove experimental
k6/experimental/webcrypto
module #4851The WebCrypto API has been available globally since
v1.0.0-rc1
(orv0.58.0
), and now the experimental import (k6/experimental/webcrypto
) is no longer available.The required change for users is to remove the
import
; the rest of the code should work.New features
New
count
method for the browser module's Locator API #4797The new
locator.Count
method returns the number of elements matching thelocator
. Unlike other Locator API methods,locator.Count
returns the result immediately and doesn't wait for the elements to be visible.New
nth
,first
andlast
methods for the browser module's Locator API #4825The new Locator API methods,
nth
,first
, andlast
, can select a single element from multiple elements matched by alocator
. 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.UX improvements and enhancements
full
end-of-test summary group results as in code and fixes the indentation. Thanks, @the-it, for the contribution!Bug fixes
k6/browser
.locator.fill
method when used on react based websites.12345
instead ofk6
to avoid having to work withrunAsUser
in the pod manifest file.click
is called.Maintenance and internal improvements
k6/browser
performance improvements.chromedp/cdproto
dependency and adjusts the Browser module accordingly.examples/grpc_server
and updates its dependencies.CODECOV_TOKEN
variable for GH Workflows from Vault.ubuntu-24.04-arm
). Thanks, @nadiamoe, for the contribution!Roadmap
Official Testing/Assertions Module
We're working to integrate a built-in testing and assertions module that's compatible with Playwright's in k6. You can try the current implementation using the k6 testing jslib, which serves as our work-in-progress implementation for what will become the official
k6/test
module (final name TBD). We'd love your feedback on issue #4805.Enhanced Machine-Readable Test Results
We're developing the next version of k6's end-of-test summary to make it easier to integrate test results into CI/CD pipelines and automated workflows. This new format will be officially supported, versioned, and designed specifically for programmatic use. Follow our progress, and provide us with feedback on issue #4803.
v1.0.0
Compare Source
Grafana k6 v1.0 is here! 🎉
After 9 years of iteration and countless community contributions, we're thrilled to announce Grafana k6 v1.0.
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.
Thank you, k6 community! 🌍
This release wouldn't be possible without you:
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.
To everyone who filed bugs, built extensions and libraries, or championed k6:️
Thank you! You've shaped what k6 is today. 🙇♂️
What's New in k6 1.0?
1. Stability You Can Build On
🔎 Read more in our versioning and stability guarantees guide.
2. First-Class TypeScript Support
Write type-safe and maintainable tests—no transpilation needed. Simply save your file with a
.ts
extension and run it directly usingk6 run script.ts
.3. Extensions Made Simple
With k6 v1.0, extensions now work out of the box in
k6 cloud run
andk6 cloud run --local-execution
. Support fork6 run
is coming soon.✅ No more xk6 toolchain.
✅ No manual builds.
✅ Import an extension's module and go.
To try the experimental feature, first enable its feature flag, then run it on Grafana Cloud with the following command:
or if you want to run it locally and stream the results to Grafana Cloud then use:
4. Revamped test summary
The new end-of-test summary makes it easier to understand results and spot issues:
compact
(default): big picture results, focusing on essentials.full
: full picture results, providing granularity.5. Quality of Life Upgrades
k6/browser
,k6/net/grpc
, andk6/crypto
are now production-ready.k6 cloud run --local-execution
.v0.59.0
Compare Source
The
v0.59.0
release mirrors the previousv1.0.0-rc2
release to allow automation tools to recognize it as the latest version.For example, Homebrew's k6 formulae and pkg.go.dev do not automatically fetch unstable versions such as
v1.0.0-rc2
, which is legitimately the expected behavior for these tools.However, this has been the default for all previous
v0.*
releases, where they were considered the latest stable version—even if they were under a version typically associated with unstable releases. To address this, we will continue releasing mirrored versions underv0.*
for necessary release candidates.This practice will end once the official stable
v1.0.0
release is available, after which we will follow the standard SemVer lifecycle to simplify the workflow for everyone.The release notes for v1.0.0-rc2 provide a detailed look at all the changes that have been implemented since
v1.0.0-rc1
/v0.58.0
and are now part of this version.v0.58.0
Compare Source
The
v0.58.0
release mirrors the previousv1.0.0-rc1
release to allow automation tools to recognize it as the latest version.For example, Homebrew's k6 formulae and pkg.go.dev do not automatically fetch unstable versions such as
v1.0.0-rc1
, which is legitimately the expected behavior for these tools.However, this has been the default for all previous
v0.*
releases, where they were considered the latest stable version—even if they were under a version typically associated with unstable releases. To address this, we will continue releasing mirrored versions underv0.*
for necessary release candidates.This practice will end once the official stable
v1.0.0
release is available, after which we will follow the standard SemVer lifecycle to simplify the workflow for everyone.The release notes for v1.0.0-rc1 provide a detailed look at all the changes that have been implemented since
v0.57.0
and are now part of this version.v0.57.0
Compare Source
k6
v0.57.0
is here 🎉! This release includes:k6 new
command now supports templates and ProjectIDs.k6/experimental/csv
module gets a newasObjects
option.k6/experimental/browser
module, in favor ofk6/browser
.internal
package.Breaking changes
k6/experimental/browser
. If you're still using it, follow the instructions to move to the graduated and stablek6/browser
module.internal
package. This was based on the publicly available extensions for k6 and may break private ones. More APIs will likely be removed or updated in follow-up releases after this more mechanical change..ts
extension. It also deprecatesexperimental_enhanced
compatibility mode as it is no longer necessary.New features
New functional testing focused official jslib k6-testing
The k6 team has been developing a new official jslib dedicated to functional testing. While it is still under active development and will potentially see breaking changes, the set of APIs and behaviors it offers are meant to make their way into k6 eventually, and it is now available for early feedback.
k6-testing is a k6 JavaScript library that offers a seamless way to write functional tests in k6, using a Playwright-compatible assertions API. It exposes an
expect
function, with which assertions can be performed using specific matchers that reflect the expected results.Unlike current k6's
check
whenexpects
assertions fail, the test will immediately fail with a clear error message, including the expected and actual values in a similar fashion to what users would observe when using Playwright assertions.There are many generic matchers (and more to come), such as
toEqual
,toBe
, ortoBeTruthy
, to only name a few, that can be used to assert conditions during a k6 test.k6-jslib-testing also includes browser-specific async matchers that wait until the expected condition is met such as
toBeVisible
,toBeDisabled
, ortoBeChecked
, to name a few.It is currently available as part of the jslib.k6.io repository and is available to use in your k6 tests by adding the following import:
Try it out and give us feedback or contribute to the project on the k6-jslib-testing repository!
--template
and--project-id
flags fork6 new
command #4153The
k6 new
command has been revamped to provide an improved experience when scaffolding new k6 tests. It now supports a--template
flag with options such asminimal
,protocol
, andbrowser
, letting you generate a script tailored to your specific use case.The command also now accepts a
--project-id
flag, which allows you to easily parameterize the test's Grafana Cloud configuration.New
asObjects
option ink6/experimental/csv
module #4295The CSV module's parsing operations now support the
asObjects
option, which enables parsing CSV data into JavaScript objects instead of arrays of strings (the default behavior).When
asObjects
is set totrue
, the module parses CSV data into objects where:With the option set to
true
,the following CSV file:
will be parsed into the following JavaScript objects:
Refer to the CSV module's documentation for more information.
UX improvements and enhancements
xk6-browser-data-
tok6browser-data-
.file
scheme URLs across file loading APIs -open
,k6/experimental/fs.open
andk6/net/grpc.Client#load
.Bug fixes
--local-execution
runs by isolatingArchive
's urls.Maintenance and internal improvements
modulestest
to make experimental streams test simpler.browser
module working with reused VUs that originally weren't used in browser scenarios.Configuration
📅 Schedule: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).
🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.
♻ Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.
🔕 Ignore: Close this PR and you won't be reminded about this update again.
This PR has been generated by Renovate Bot.