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.
Created by
brew bump
Created with
brew bump-formula-pr
.release notes
options.cloud
option.k6/timers
module.k6/experimental/webcrypto
module.Breaking changes
name
tag, which also overwrites theurl
tag with thename
value. This change makes it consistent with the logic that was implemented in k6 v0.41. Thanks, @mkadirtan for contributing!Browser APIs to Async
In future releases, we are going to be moving most of the synchronous browser APIs to asynchronous ones (promisifying them). We expect this will affect most of our users, so we are posting this upfront before making the change. Here are the reasons for making this large breaking change:
You can find a list of all the APIs that we expect to convert to async in a comment in issue browser#428.
Awaiting on something that’s not a thenable just returns that value, which means you can add the
await
keyword against APIs that will become async to future proof your test scripts.New features
Add support for uploading files from the browser module browser#1097, browser#1244
You can now upload files using the available input forms on the website under test. The new API is
setInputFiles
which can be called from apage
,frame
orelementHandle
types. It can upload one or more files encoded in the test script. To upload files from the local file system, work with the experimental fs module.Expand to see the examples.
For the following examples, we will use the HTML file:
Uploading a file can be achieved with the following script:
Uploading multiple files can be done with the use of an array:
Thanks to @bandorko! :bow: :tada:
Introducing options.cloud #3348, #3407
In this release, we introduce a new way of defining cloud options. From now on, you can use
options.cloud
instead ofoptions.ext.loadimpact
.To migrate, you can move the
loadimpact
object to the root of theoptions
object and rename it tocloud
. For example:All scripts with legacy
options.ext.loadimpact
will continue to function as before. There's no planned sunset date for the legacy option, but we highly encourage usingoptions.cloud
going forward. For more details about cloud options, refer to Cloud options.Timers API becomes part of the k6 core #3587
With this release, the timers API is no longer experimental and can be imported as
k6/timers
instead of ask6/experimental/timers
. The later will be supported untilv0.52.0
.You can also contribute to the discussion on making the current timer exports globally available in #3589, or just give it a :+1:.
JSON Web Key support in
k6/experimental/webcrypto
module webcrypto#61The experimental webcrypto module now supports the JSON Web Key (JWK) format, using the
importKey
andexportKey
methods.This allows you to import and export keys in the JWK format for the supported algorithms.
UX improvements and enhancements
evaluate
APIs.testRunId
into thewindow.k6
object for external applications to query (for example, Grafana Faro).Browser Context Isolation browser#1112
With this release, we have overhauled and (tremendously) improved the performance and stability of the browser module. It's now possible to run tests with a larger number of VUs concurrently without any performance issues. Previously, when running tests with multiple VUs concurrently, each VU's browser context would attach to the pages from the other VUs' browser contexts. This led to unexpected behavior and performance issues and, to an extent, reduced the module's capability to run multi-VU tests.
Bug fixes
options.hosts
.DocumentFragment
.Maintenance and internal improvements
browser#1173, browser#1175, browser#1179,
browser#1183, browser#1186, browser#1188,
browser#1189, browser#1190, browser#1191,
browser#1193, browser#1163, browser#1205,
browser#1217 refactors internals to improve stability.
browser#1214, browser#1216 refactors to work with errors.Join and sets the minimum Go version to 1.20.
codeql
GitHub action to v3.newTestSetup
rely on k6's modulestest.