fix(deps): update module go.k6.io/k6 to v1.6.1#12
Open
renovate-sh-app[bot] wants to merge 1 commit intomainfrom
Open
fix(deps): update module go.k6.io/k6 to v1.6.1#12renovate-sh-app[bot] wants to merge 1 commit intomainfrom
renovate-sh-app[bot] wants to merge 1 commit intomainfrom
Conversation
Contributor
Author
ℹ Artifact update noticeFile name: extensions/xk6-judge/go.modIn order to perform the update(s) described in the table above, Renovate ran the
Details:
|
c5fcdd6 to
577a581
Compare
577a581 to
ecd2690
Compare
ecd2690 to
3c6bdd5
Compare
3c6bdd5 to
4c03f1f
Compare
Contributor
Author
ℹ️ Artifact update noticeFile name: extensions/xk6-judge/go.modIn order to perform the update(s) described in the table above, Renovate ran the
Details:
|
1c85c25 to
f444da5
Compare
f444da5 to
6980b4e
Compare
| datasource | package | from | to | | ---------- | ----------- | ------ | ------ | | go | go.k6.io/k6 | v1.2.3 | v1.6.1 | Signed-off-by: renovate-sh-app[bot] <219655108+renovate-sh-app[bot]@users.noreply.github.com>
6980b4e to
8271891
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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:
v1.2.3→v1.6.1Release Notes
grafana/k6 (go.k6.io/k6)
v1.6.1Compare Source
k6
v1.6.1is here! This patch release includes:Bug fixes
experimental/csvmodule when multiple files with async code usecsv.parsein parallel during initialization.Maintenance and security updates
with-browserDocker image.v1.6.0Compare Source
k6 v1.6.0 is here 🎉! This release includes:
k6 depscommand for analyzing script dependencies.frameLocator(),goBack(),goForward()methods.jslibgets a new TOTP library for time-based one-time password generation and validation.Breaking changes
There are no breaking changes in this release.
New features
Configurable default stack for Cloud commands #5420
Cloud commands now support configuring the default Grafana Cloud stack you want to use. The stack slug (or stack id) is used by the Cloud to determine which default project to use when not explicitly provided.
Previously, users had to specify the project id for every test run. With this change, you can configure a default stack during login, and k6 will use it to automatically resolve the appropriate default project. This is particularly useful for organizations with multiple Grafana Cloud stacks or when working across different teams and environments.
Users can also set up a specific stack for every test run, either using the new option
stackIDor the environment variableK6_CLOUD_STACK_ID.Please note that, in k6 v2, this stack information will become mandatory to run a test.
This simplifies the cloud testing workflow and prepares k6 for upcoming changes to the Grafana Cloud k6 authentication process, where the stack will eventually become mandatory.
k6 depscommand and manifest support #5410, #5427A new
k6 depscommand is now available to analyze and list all dependencies of a given script or archive. This is particularly useful for understanding which extensions are required to run a script, especially when using auto extension resolution.The command identifies all imports in your script and lists dependencies that might be needed for building a new binary with auto extension resolution. Like auto extension resolution itself, this only accounts for imports, not dynamic
require()calls.This makes it easier to understand extension requirements, share scripts with clear dependency information, and integrate k6 into automated build pipelines.
In addition, k6 now supports a manifest that specifies default version constraints for dependencies when no version is defined in the script using pragmas. If a dependency is imported without an explicit version, it defaults to "*", and the manifest can be used to replace that with a concrete version constraint.
The manifest is set through an environment variable as JSON with keys being a dependency and values being constraints:
In this example, if the script only imports
k6/x/fakerand does not use ause k6 with k6/x/faker ...directive, it will set the version constraint to>=v0.4.4. It will not make any changes ifk6/x/fakeris not a dependency of the script at all.Browser module:
frameLocator()method #5487The browser module now supports
frameLocator()onPage,Frame,Locator, andFrameLocatorobjects. This method creates a locator for working withiframeelements without the need to explicitly switch contexts, making it much easier to interact with embedded content.Frame locators are particularly valuable when testing applications with nested iframes, as they allow you to chain locators naturally while maintaining readability:
Click to expand example code
This complements existing frame handling methods and provides a more intuitive API for working with iframe-heavy applications.
Browser module:
goBack()andgoForward()navigation methods #5494The browser module now supports
page.goBack()andpage.goForward()methods for browser history navigation. These methods allow you to navigate the page's history, similar to clicking the browser's back/forward buttons.Click to expand example code
Browser module: Request event handlers #5481, #5486
The browser module now supports
page.on('requestfailed')andpage.on('requestfinished')event handlers, enabling better monitoring and debugging of network activity during browser tests.The
requestfailedevent fires when a request fails (network errors, aborts, etc.), whilerequestfinishedfires when a request completes successfully.Click to expand example code
These event handlers provide deeper insights into network behavior during browser testing and help identify issues that might not be immediately visible.
Crypto module: PBKDF2 support #5380
The crypto module now supports PBKDF2 for deriving cryptographic keys from passwords. PBKDF2 is widely used for password hashing and key derivation in security-sensitive applications, and this addition enables testing of systems that use PBKDF2 for authentication or encryption.
For usage examples, check out the one provided in the repository or refer to the documentation.
WebSockets module is now stable #5586
The websockets module has been promoted to stable status and is now available via the
k6/websocketspath.The experimental
k6/experimental/websocketsmodule will be removed in a future release. Users should migrate to the stablek6/websocketsmodule.To migrate, simply update your import statement:
No other changes are required because the API is the same.
Console logging: ArrayBuffer and TypedArray support #5496
console.log()now properly displaysArrayBufferandTypedArrayobjects, making it easier to debug binary data handling in your test scripts. Previously, these types would not display useful information, making debugging difficult when working with binary protocols, file uploads, or WebSocket binary messages.Click to expand example code
Configurable TLS version for Experimental Prometheus output #5537
The experimental Prometheus remote write output now supports configuring the minimum TLS version used for connections. This allows you to meet specific security requirements or compatibility constraints when sending metrics to Prometheus endpoints.
If not set, the default minimum TLS version is 1.3.
A new TOTP library k6-totp
A new TOTP (Time-based One-Time Password) library is now available in jslib.k6.io, enabling k6 scripts to generate and validate time-based one-time passwords. This is particularly useful for testing applications that use TOTP-based two-factor authentication (2FA), such as authenticator apps like Google Authenticator or Authy. See the documentation at k6-totp.
Click to expand example code
The library follows the standard TOTP RFC 6238 specification, ensuring compatibility with standard authenticator applications.
Introducing mcp-k6: AI-assisted k6 script writing mcp-k6
mcp-k6 is an experimental Model Context Protocol (MCP) server for k6. Once connected to your AI assistant or MCP-compatible editor (such as Cursor, VS Code, or Claude Desktop), it helps you write better k6 scripts faster and run them with confidence.
With mcp-k6, your AI assistant can:
export default functiondeclarations before execution.To get started, install mcp-k6 via Docker, Homebrew, or from source, then configure it with your editor. See the documentation for installation instructions and setup guides.
UX improvements and enhancements
ExecutionStatusMarkedAsFailedwhen a test is explicitly marked as failed usingexec.test.fail().Bug fixes
csv.parse()where each VU created its own copy of CSV data instead of sharing it.saltLength: 0with RSA-PSS sign/verify operations.Config.String()in the OpenTelemetry output to properly displayExporterProtocol.Maintenance and internal improvements
WaitForEventmapping more type-safe and consistent by using a typed event name parameter instead of a raw string.make generatecommand OS-agnostic for cross-platform compatibility.github.com/jhump/protoreflect/desc/protoparsewithgithub.com/bufbuild/protocompilefor better protobuf parsing.cloudapi/v6package with authentication features.onAttachedToTargetcontext done detection for better maintainability.TestFlushMaxSeriesInBatchnon-deterministic behavior.frameLocatorPR review comments and improves code organization.t.Parallel()onTestCompilefor now, to reduce flakiness in CI.Roadmap
We've started looking into k6 v2! The major release will focus on introducing breaking changes that have accumulated throughout the v1.x series, such as removing deprecated APIs and changing default behaviors. New features will continue to be incrementally released in v1.x minor versions as usual until the v2.0.0 release.
External contributors
A huge thank you to the external contributors who helped during this release: @LBaronceli, @baeseokjae, @chojs23, @pkalsi97, @weillercarvalho, @ariasmn, @rahulmedicharla, @janHildebrandt98 and @shota3506! 🙏
v1.5.0Compare Source
k6 1.5.0 is here 🎉! This release includes:
page.waitForEvent()for event-based synchronization with page events.locator.pressSequentially()for character-by-character typing simulation.console.log().Breaking changes
As per our stability guarantees, breaking changes across minor releases are allowed only for experimental features.
experimental/redismodule. The module will be removed in a future release. Users should migrate to alternative solutions, such as the official k6 Redis extension.New features
page.waitForEvent()#5478The browser module now supports
page.waitForEvent(), which blocks the caller until a specified event is captured.If a predicate is provided, it waits for an event that satisfies the predicate. This method is particularly valuable for testing scenarios where you need to synchronize your test flow with specific browser or page events before proceeding with the next action.
Event-driven synchronization is vital for test reliability, especially when dealing with asynchronous operations where timing is unpredictable. This is more robust than using fixed delays and helps avoid flaky tests.
locator.pressSequentially()#5457The browser module now supports
locator.pressSequentially(), which types text character by character, firing keyboard events (keydown,keypress,keyup) for each character. This method is essential for testing features that depend on gradual typing to trigger specific behaviors, such as autocomplete suggestions, real-time input validation per character, or dynamic character counters.The method supports a configurable delay between keystrokes, enabling you to simulate realistic typing speeds and test time-dependent input handlers:
This complements existing text input methods:
locator.fill()for simple form filling,locator.type()for gradual typing without keyboard events, and nowpressSequentiallyfor character-by-character typing with full keyboard event firing.Thank you, @rajan2345, for the contribution 🎉
console.log()Deep Object Logging #5460console.log()now properly traverses and displays complex JavaScript structures, including functions, classes, and circular references. Previously, Sobek's JSON marshaling would lose nested functions, classes, and other non-serializable types, making debugging painful.Objects with mixed function and class properties are now properly displayed:
Nested arrays and objects with functions are now fully traversed:
Complex objects with multiple property types are properly preserved:
Circular references are now properly detected and marked:
This improvement makes debugging k6 test scripts significantly easier when working with API responses, event handlers, and complex state objects.
experimental/websockets- Close Code and Reason Support #5376The experimental WebSockets module now supports sending close codes and reasons when closing connections, and properly captures close event information. This is essential for testing WebSocket
implementations that rely on specific close codes to determine whether a connection was closed normally or due to an error.
Thanks, @etodanik, for the contribution 🎉
Subcommand Extension Support #5399
Extensions can now register custom subcommands under the
k6 xnamespace, enabling custom command-line tools that integrate seamlessly with k6. This provides a consistent and discoverable way for extensions to offer specialized CLI utilities while maintaining k6's familiar command structure.Extensions can now define custom commands like:
This integration pattern allows extension authors to provide powerful tooling that feels native to the k6 ecosystem.
DNS Resolver Access #5421
Extensions can now access k6's DNS resolver for custom DNS handling and networking extensions. The resolver respects k6's configuration including
hostsoverrides, custom DNS servers, and DNS caching settings. This enables extensions to use it directly instead of having to reproduce the functionality. Which also makes them work the same way as native modules.Machine-Readable Summary Format #5338
A new machine-readable summary format for the end-of-test summary is now available, providing structured, programmatic shapes via
--summary-exportandhandleSummary(). This format is designed for easier integration with external systems and analytics pipelines.The new format is currently opt-in via the
--new-machine-readable-summaryflag orK6_NEW_MACHINE_READABLE_SUMMARYenvironment variable, and will become the default in k6 v2:This makes it easier to integrate k6 results into CI/CD pipelines, dashboards, and custom analysis tools.
URL-Based Secret Management #5413
The secret management system now supports URL-based secret sources, allowing k6 to fetch secrets from HTTP endpoints. This lets users implement a simple HTTP API to provide secrets to a test. There is a mock implementation, but no particular production-ready implementation is provided at this time. In the future, there is potential for proxies to other systems, including HashiCorp Vault, AWS Secrets Manager, or Azure Key Vault.
UX improvements and enhancements
Bug fixes
getBy*selectors when using quotes inside element names.page.onhandlers.EndIteration.ArrayViewsin experimental/websockets.Maintenance and internal improvements
ExecutionStatusMarkedAsFailedstatus for improved test execution tracking.TestNavigationSpanCreationtest in the browser module.closecall in integration tests.SECURITY.mdto sync with Grafana's org-wide security policy documentation.Roadmap
Deprecation of First Input Delay (FID) Web Vital
Following the official web vitals guidance, First Input Delay (FID) is no longer a Core Web Vital as of September 9, 2024, having been replaced by Interaction to Next Paint (INP). The k6 browser module already emits INP metrics, and we're planning to deprecate FID support to align with industry standards.
FID only measures the delay before the browser runs your event handler, so it ignores the time your code takes and the delay to paint the UI—often underestimating how slow an interaction feels. INP captures the full interaction latency (input delay + processing + next paint) across a page’s interactions, so it better reflects real user-perceived responsiveness and is replacing FID.
Action required
If you're currently using FID in your test scripts for thresholds or relying on it in external integrations, you should migrate to using INP as soon as possible.
This change ensures k6 browser testing stays aligned with modern web performance best practices and Core Web Vitals standards.
v1.4.2Compare Source
k6
v1.4.2is here 🎉!This is a patch release that includes:
v1.4.1Compare Source
k6
v1.4.1is here 🎉!This is a patch release that includes:
expect()syntax in script templates"We'll re-introduce assertion-based templates down the road when the integration is seamless.
v1.4.0Compare Source
k6
v1.4.0is here 🎉! This release includes:page.waitForRequestfor waiting on specific HTTP requests.QueryAllmethods now return elements in DOM order.locator.evaluateandlocator.evaluateHandlefor executing JavaScript code in the page context with access to the matching element.page.unroute(url)andpage.unrouteAllfor removing routes registered withpage.route.Breaking changes
As per our stability guarantees, breaking changes across minor releases are allowed only for experimental features.
Breaking changes for experimental modules
zero/nonzerolabels instead of separate metrics.K6_OTEL_EXPORTER_TYPEis deprecated in favor ofK6_OTEL_EXPORTER_PROTOCOLto align with OpenTelemetry standards.Breaking changes for undefined behaviours
importstatements and no longer supports CommonJSrequire()calls. CommonJSrequire()calls are dynamic, and it is not possible to know for certain if they will be called, or if they will be called with static strings - the only way they were even previously loaded. This functionality was a quirk of the previous implementation and had numerous problems. Additionally,use k6directives are now only recognized when they appear at the beginning of files (after optional shebang and whitespace/comments). This was the original intention, but due to implementation bugs, it did not accurately reflect what was happening.New features
OpenTelemetry output graduation #5334
The OpenTelemetry output has graduated from experimental status and is now available as a stable output using the name
opentelemetry. This change makes OpenTelemetry the recommended vendor-agnostic solution for exporting k6 telemetry data.You can now use the stable output name in your k6 commands:
The
experimental-opentelemetryname will continue to work for backward compatibility for now but it's deprecated and we might remove it in future versions. We recommend migrating to use the newopentelemetryname.page.waitForRequest#5330The browser module now supports
page.waitForRequest(), which allows you to wait for HTTP requests that match specific URL patterns during browser automation. This method is particularly valuable for testing scenarios where you need to ensure specific network requests are initiated before proceeding with test actions.The method supports multiple URL pattern matching strategies:
This complements the existing
page.waitForResponse()method by focusing on HTTP requests rather than responses, providing more granular control over network-dependent test scenarios.page.unroute(url)andpage.unrouteAll()#5223The browser module now supports
page.unroute(url)andpage.unrouteAll(), allowing you to remove routes previously registered withpage.route.Example usage:
locator.evaluateandlocator.evaluateHandle#5306The browser module now supports
locator.evaluateandlocator.evaluateHandle, allowing you to execute JavaScript code in the page context with access to the matching element. The only difference betweenevaluateandevaluateHandleis thatevaluateHandlereturns a JSHandle.Example usage:
New officially supported k6 DNS extension
The
xk6-dnsextension is now officially supported in k6 OSS and k6 Cloud. You can importk6/x/dnsdirectly in your scripts thanks to automatic extension resolution, with no custom build required.Use it to perform DNS resolution testing as part of your tests: resolve names via custom or system DNS, measure resolution latency and errors, validate records before HTTP steps, compare resolvers, and even load test DNS servers in end‑to‑end scenarios.
For example:
The extension currently supports A and AAAA record lookups. If you would like to see additional record types supported, please consider contributing to the extension.
Automatic extension resolution improvements #5320, #5239, #5342, #5332, #5240
Automatic extension resolution has been completely reimplemented to use k6's internal module loader instead of the external
k6deps/esbuild pipeline. This change brings significant improvements in reliability and maintainability.As part of the rewrite, a few issues and unintended features were found, namely:
requirecalls, which, due to their dynamic nature, don't work particularly stably. That is, depending on where and how therequirecall was used, k6 might decide whether it is needed or not. And it definitely doesn't work when using actual string variables. Support for CommonJS is primarily for backward compatibility, so after an internal discussion, we opted not to support it at all. We could bring this back until v2, if there is enough interest. However, in the long term, it is intended that this not be part of k6.Example:
Or, an example using the directive with CommonJS
In this example, k6 will detect both
k6/x/fakerandk6/x/redisextensions from theuse k6directives in both files and provision a binary that includes both extensions if needed.Other fixes this brings are:
Fixes for path related issues (irregardless of usage of the feature) on windows, especially between drives. It is possible there were problems on other OSes that were just not reported. #5176
Syntax errors were not reported as such, as the underlying
esbuildparsing will fail, but won't be handled well. #5127, #5104Propagating exit codes from a sub-process running the new k6. This lets you use the result of the exit code.
UX improvements and enhancements
QueryAllmethods now return elements in DOM order. Thank you, @shota3506, for the contribution.Bug fixes
browser.newPageInContextbug where pages created in a non-existing browser context.Maintenance and internal improvements
k6ext.Promiseto the mapping layer.VUfields.envconfig.TestPageOnResponseto fail fast on errors. Thank you, @rMaxiQp for the contribution.requirecalls during the initial loading of modules, instead for each call in all execution of all VUs.v1.3.0Compare Source
k6 v1.3.0 is here 🎉! This release includes:
locator.locator,locator.contentFrame, andFrameLocator.locatorfor powerful locator chaining and iframe handling.locator|frame|FrameLocator.getBy*for targeting elements without relying on brittle CSS selectors.locator.filterfor filtering locators for more precise element targeting.locator.boundingBoxfor retrieving element geometry.page.waitForResponsefor waiting on specific HTTP responses.Deprecations
A new summary mode
disabledhas been introduced to replace the "no summary" option #5118The
--no-summaryflag and its corresponding environment variableK6_NO_SUMMARYhave been deprecated in favor ofthe new
disabledsummary mode. This change unifies the configuration experience for controlling the end-of-test summary.You can now disable the end-of-test summary with either
--summary-mode=disabledorK6_SUMMARY_MODE=disabled.The
legacysummary mode has been deprecated [#5138](hConfiguration
📅 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.
Need help?
You can ask for more help in the following Slack channel: #proj-renovate-self-hosted. In that channel you can also find ADR and FAQ docs in the Resources section.