Closed renovate[bot] closed 6 months ago
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.
Closed in favor of #388
Because you closed this PR without merging, Renovate will ignore this update (v0.49.0
). You will get a PR once a newer version is released. To ignore this dependency forever, add it to the ignoreDeps
array of your Renovate config.
If you accidentally closed this PR, or if you changed your mind: rename this PR to get a fresh replacement PR.
This PR contains the following updates:
v0.47.0
->v0.49.0
Release Notes
grafana/k6 (go.k6.io/k6)
### [`v0.49.0`](https://togithub.com/grafana/k6/releases/tag/v0.49.0) [Compare Source](https://togithub.com/grafana/k6/compare/v0.48.0...v0.49.0) k6 `v0.49.0` is here 🎉! This release: - Adds a built-in [web dashboard](https://grafana.com/docs/k6/latest/results-output/web-dashboard/) that displays test results in real time. - Introduces `clear` functionality to the browser module's `locator` classes. - Merges the gRPC experimental module back into the gRPC core module. - Enables the ability to get the selection from an element in `k6/html`. - Collects internal modules and outputs used by a script. - Prepares `k6/experimental/timers` for stabilization. #### Breaking changes - [#3494](https://togithub.com/grafana/k6/pull/3494) stops updating `loadimpact/k6` docker image. If you still use it, please migrate to the [grafana/k6](https://hub.docker.com/r/grafana/k6) image. - [browser#1111](https://togithub.com/grafana/xk6-browser/pull/1111) removes `timeout` option for `isVisible` and `isHidden` since the API no longer waits for the element to appear on the page. #### New features ##### Web Dashboard The new [web dashboard](https://grafana.com/docs/k6/latest/results-output/web-dashboard/) brings real-time visualization to load testing. This feature allows users to monitor test progress and analyze results dynamically, enhancing the overall testing experience. ##### Real-time test results Activate this feature using the environment variable `K6_WEB_DASHBOARD=true`. For this initial release, the dashboard is not enabled by default to allow users to opt into this new experience as it evolves. ```bash K6_WEB_DASHBOARD=true k6 run script.js ``` Once enabled and the test script is running, navigate to [http://localhost:5665](http://localhost5665) in your web browser to access the dashboard. ![k6 Web Dashboard Overview](https://togithub.com/grafana/xk6-dashboard/blob/master/screenshot/k6-dashboard-overview-light.png?raw=true) ##### Test report The web dashboard also offers an HTML test report (see [an example](https://togithub.com/grafana/xk6-dashboard/blob/master/screenshot/k6-dashboard-html-report-screen-view.png?raw=true)) for detailed analysis, enabling easy sharing and downloading capabilities for collaboration. To access and download the report, click on the **Report** button in the dashboard's top right corner or use the `K6_WEB_DASHBOARD_EXPORT` environment variable. ```bash K6_WEB_DASHBOARD=true K6_WEB_DASHBOARD_EXPORT=test-report.html k6 run script.js ``` ##### Add `clear` to the `locator` class [browser#1149](https://togithub.com/grafana/xk6-browser/pull/1149) The new `clear` method on the `locator` class clears the text boxes and input fields. This is useful when navigating to a website where the text boxes and input fields already contain a value that needs to be cleared before filling it with a specific value.Expand to see an example of the new functionality.
```javascript import { check } from 'k6'; import { browser } from 'k6/experimental/browser'; export const options = { scenarios: { ui: { executor: 'shared-iterations', options: { browser: { type: 'chromium', }, }, }, }, } export default async function() { const context = browser.newContext(); const page = context.newPage(); await page.goto('https://test.k6.io/my_messages.php', { waitUntil: 'networkidle' }); // To mimic an input field with existing text. page.locator('input[name="login"]').type('admin'); check(page, { 'not_empty': p => p.locator('input[name="login"]').inputValue() != '', }); // Clear the text. page.locator('input[name="login"]').clear(); check(page, { 'empty': p => p.locator('input[name="login"]').inputValue() == '', }); page.close(); } ```Expand to see an example of the new functionality.
This example shows the new module usage: ```javascript import fs from 'k6/experimental/fs'; // k6 doesn't support async in the init context. We use a top-level async function for `await`. // // Each Virtual User gets its own `file` copy. // So, operations like `seek` or `read` won't impact other VUs. let file; (async function () { file = await open('bonjour.txt'); })(); export default async function () { // About information about the file const fileinfo = await file.stat(); if (fileinfo.name != 'bonjour.txt') { throw new Error('Unexpected file name'); } const buffer = new Uint8Array(128); let totalBytesRead = 0; while (true) { // Read into the buffer const bytesRead = await file.read(buffer); if (bytesRead == null) { // EOF break; } // Do something useful with the content of the buffer totalBytesRead += bytesRead; // If bytesRead is less than the buffer size, we've read the whole file if (bytesRead < buffer.byteLength) { break; } } // Check that we read the expected number of bytes if (totalBytesRead != fileinfo.size) { throw new Error('Unexpected number of bytes read'); } // Seek back to the beginning of the file await file.seek(0, SeekMode.Start); } ```Expand to see an example of the new functionality.
This example shows the usage of the new `Options` object: ```javascript import redis from 'k6/experimental/redis'; const redisClient = new redis.Client({ socket: { host: 'localhost', port: 6379, }, username: 'someusername', password: 'somepassword', }); ```Expand to see an example of the new functionality.
This example shows the configuration of a TLS connection: ```javascript import redis from 'k6/experimental/redis'; const redisClient = new redis.Client({ socket: { host: 'localhost', port: 6379, tls: { ca: [open('ca.crt')], cert: open('client.crt'), // client certificate key: open('client.key'), // client private key }, }, }); ```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 Mend Renovate. View repository job log here.