From 553f8148f36c6d7e415efd2322d2df7f4bd4fb91 Mon Sep 17 00:00:00 2001 From: Mihail Stoykov Date: Thu, 14 Dec 2023 11:00:46 +0200 Subject: [PATCH 01/27] Use template to start v0.49.0 release notes --- release notes/v0.49.0.md | 47 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 47 insertions(+) create mode 100644 release notes/v0.49.0.md diff --git a/release notes/v0.49.0.md b/release notes/v0.49.0.md new file mode 100644 index 00000000000..82d3b57c4d4 --- /dev/null +++ b/release notes/v0.49.0.md @@ -0,0 +1,47 @@ +k6 `v0.49.0` is here πŸŽ‰! This release includes: + +- (_optional_) `` +- `` (_one or multiple bullets_) + + +## Breaking changes + +- `#pr`, `` +- `#pr`, `` + +### (_optional h3_) `` `#pr` + +## New features + +_optional intro here_ + +### `` `#pr` + +_what, why, and what this means for the user_ + +### `` `#pr` + +_what, why, and what this means for the user_ + +## UX improvements and enhancements + +_Format as ` . `_: + +- _`#999` Gives terminal output prettier printing. Thanks to `@person` for the help!_ +- `#pr` `` +- `#pr` `` + +## Bug fixes + +_Format as ` . `_: +- _`#111` fixes race condition in runtime_ + +## Maintenance and internal improvements + +_Format as ` . `_: +- _`#2770` Refactors parts of the JS module._ + +## _Optional_ Roadmap + +_Discussion of future plans_ + From 4e87e872bba250c100a97e9bfdc5a5336f8d1dcc Mon Sep 17 00:00:00 2001 From: Mihail Stoykov Date: Thu, 14 Dec 2023 11:11:28 +0200 Subject: [PATCH 02/27] Add some v0.49.0 changes --- release notes/v0.49.0.md | 17 ++++++----------- 1 file changed, 6 insertions(+), 11 deletions(-) diff --git a/release notes/v0.49.0.md b/release notes/v0.49.0.md index 82d3b57c4d4..2c9aa2a1abc 100644 --- a/release notes/v0.49.0.md +++ b/release notes/v0.49.0.md @@ -6,8 +6,9 @@ k6 `v0.49.0` is here πŸŽ‰! This release includes: ## Breaking changes -- `#pr`, `` -- `#pr`, `` + +- [#3494](https://github.com/grafana/k6/pull/3494) stop pushing `loadimpact/k6` docker image. If you are still using it is recommend that you start using `grafana/k6` + ### (_optional h3_) `` `#pr` @@ -25,21 +26,15 @@ _what, why, and what this means for the user_ ## UX improvements and enhancements -_Format as ` . `_: - -- _`#999` Gives terminal output prettier printing. Thanks to `@person` for the help!_ -- `#pr` `` -- `#pr` `` +- [#3440](https://github.com/grafana/k6/pull/3440) use built-in certificates if none are provided by the OS. Thanks to `@mem` for wokring on it! ## Bug fixes -_Format as ` . `_: -- _`#111` fixes race condition in runtime_ +- [#3485](https://github.com/grafana/k6/pull/3485) fixes the rest API always logging it returned 200, which was found as part of fixing lint issues in the code. ## Maintenance and internal improvements -_Format as ` . `_: -- _`#2770` Refactors parts of the JS module._ +- A lot of lint fixes through out the k6 code base [#3460](https://github.com/grafana/k6/pull/3460), [#3462](https://github.com/grafana/k6/pull/3462), [#3463](https://github.com/grafana/k6/pull/3463), [#3478](https://github.com/grafana/k6/pull/3478), [#3479](https://github.com/grafana/k6/pull/3479), [#3480](https://github.com/grafana/k6/pull/3480), [#3481](https://github.com/grafana/k6/pull/3481), [#3482](https://github.com/grafana/k6/pull/3482), [#3483](https://github.com/grafana/k6/pull/3483), [#3484](https://github.com/grafana/k6/pull/3484), [#3485](https://github.com/grafana/k6/pull/3485), [#3495](https://github.com/grafana/k6/pull/3495). ## _Optional_ Roadmap From afafd414177ef4f76524e09e866c11a0114a3dd5 Mon Sep 17 00:00:00 2001 From: ankur22 Date: Fri, 15 Dec 2023 16:06:18 +0000 Subject: [PATCH 03/27] Add PRs for browser issue 987 --- release notes/v0.49.0.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/release notes/v0.49.0.md b/release notes/v0.49.0.md index 2c9aa2a1abc..9b5f45f9095 100644 --- a/release notes/v0.49.0.md +++ b/release notes/v0.49.0.md @@ -27,14 +27,18 @@ _what, why, and what this means for the user_ ## UX improvements and enhancements - [#3440](https://github.com/grafana/k6/pull/3440) use built-in certificates if none are provided by the OS. Thanks to `@mem` for wokring on it! +- [browser#1135](https://github.com/grafana/xk6-browser/pull/1135) improves the array output from `console` in the k6 logs. ## Bug fixes - [#3485](https://github.com/grafana/k6/pull/3485) fixes the rest API always logging it returned 200, which was found as part of fixing lint issues in the code. +- [browser#1129](https://github.com/grafana/xk6-browser/pull/1129) mitigates the risk of panics when the website under test uses the `console`. +- [browser#1133](https://github.com/grafana/xk6-browser/pull/1133) fixes `BigInt` parsing. ## Maintenance and internal improvements - A lot of lint fixes through out the k6 code base [#3460](https://github.com/grafana/k6/pull/3460), [#3462](https://github.com/grafana/k6/pull/3462), [#3463](https://github.com/grafana/k6/pull/3463), [#3478](https://github.com/grafana/k6/pull/3478), [#3479](https://github.com/grafana/k6/pull/3479), [#3480](https://github.com/grafana/k6/pull/3480), [#3481](https://github.com/grafana/k6/pull/3481), [#3482](https://github.com/grafana/k6/pull/3482), [#3483](https://github.com/grafana/k6/pull/3483), [#3484](https://github.com/grafana/k6/pull/3484), [#3485](https://github.com/grafana/k6/pull/3485), [#3495](https://github.com/grafana/k6/pull/3495). +- [browser#1134](https://github.com/grafana/xk6-browser/pull/1134) adds a new error type when parsing objects. ## _Optional_ Roadmap From 0b636f67c97586625b0fc54f85136caad3bf311c Mon Sep 17 00:00:00 2001 From: ankur22 Date: Fri, 15 Dec 2023 16:19:34 +0000 Subject: [PATCH 04/27] Add PRs for browser issue 981 --- release notes/v0.49.0.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/release notes/v0.49.0.md b/release notes/v0.49.0.md index 9b5f45f9095..306033faab7 100644 --- a/release notes/v0.49.0.md +++ b/release notes/v0.49.0.md @@ -8,6 +8,7 @@ k6 `v0.49.0` is here πŸŽ‰! This release includes: - [#3494](https://github.com/grafana/k6/pull/3494) stop pushing `loadimpact/k6` docker image. If you are still using it is recommend that you start using `grafana/k6` +- [browser#1111](https://github.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. ### (_optional h3_) `` `#pr` @@ -34,11 +35,13 @@ _what, why, and what this means for the user_ - [#3485](https://github.com/grafana/k6/pull/3485) fixes the rest API always logging it returned 200, which was found as part of fixing lint issues in the code. - [browser#1129](https://github.com/grafana/xk6-browser/pull/1129) mitigates the risk of panics when the website under test uses the `console`. - [browser#1133](https://github.com/grafana/xk6-browser/pull/1133) fixes `BigInt` parsing. +- [browser#1108](https://github.com/grafana/xk6-browser/pull/1108), [browser#1110](https://github.com/grafana/xk6-browser/pull/1110) fixes `isVisible` and `isHidden` so that it does not wait for an element to match with the given `selector`, allowing it to continue on with the test script when elements are not on the page. ## Maintenance and internal improvements - A lot of lint fixes through out the k6 code base [#3460](https://github.com/grafana/k6/pull/3460), [#3462](https://github.com/grafana/k6/pull/3462), [#3463](https://github.com/grafana/k6/pull/3463), [#3478](https://github.com/grafana/k6/pull/3478), [#3479](https://github.com/grafana/k6/pull/3479), [#3480](https://github.com/grafana/k6/pull/3480), [#3481](https://github.com/grafana/k6/pull/3481), [#3482](https://github.com/grafana/k6/pull/3482), [#3483](https://github.com/grafana/k6/pull/3483), [#3484](https://github.com/grafana/k6/pull/3484), [#3485](https://github.com/grafana/k6/pull/3485), [#3495](https://github.com/grafana/k6/pull/3495). - [browser#1134](https://github.com/grafana/xk6-browser/pull/1134) adds a new error type when parsing objects. +- [browser#1107](https://github.com/grafana/xk6-browser/pull/1107), [browser#1109](https://github.com/grafana/xk6-browser/pull/1109) refactor internals. ## _Optional_ Roadmap From 37e10bad5b1e6d28f21f02d96e8a0043e60db9a3 Mon Sep 17 00:00:00 2001 From: ankur22 Date: Fri, 15 Dec 2023 16:22:45 +0000 Subject: [PATCH 05/27] Add PR for browser issue 469 --- release notes/v0.49.0.md | 1 + 1 file changed, 1 insertion(+) diff --git a/release notes/v0.49.0.md b/release notes/v0.49.0.md index 306033faab7..bcf2b936eb3 100644 --- a/release notes/v0.49.0.md +++ b/release notes/v0.49.0.md @@ -36,6 +36,7 @@ _what, why, and what this means for the user_ - [browser#1129](https://github.com/grafana/xk6-browser/pull/1129) mitigates the risk of panics when the website under test uses the `console`. - [browser#1133](https://github.com/grafana/xk6-browser/pull/1133) fixes `BigInt` parsing. - [browser#1108](https://github.com/grafana/xk6-browser/pull/1108), [browser#1110](https://github.com/grafana/xk6-browser/pull/1110) fixes `isVisible` and `isHidden` so that it does not wait for an element to match with the given `selector`, allowing it to continue on with the test script when elements are not on the page. +- [browser#1121](https://github.com/grafana/xk6-browser/pull/1121) fixes `dblClick` so that it works with `onDblClick` and performs two clicks on the specified element. ## Maintenance and internal improvements From 9a0db1276db88ee99869734ea6c0d1577b7274ce Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C4=B0nan=C3=A7=20G=C3=BCm=C3=BC=C5=9F?= Date: Mon, 8 Jan 2024 13:16:59 +0200 Subject: [PATCH 06/27] Update release notes for 1135 and 1137 (#3516) --- release notes/v0.49.0.md | 1 + 1 file changed, 1 insertion(+) diff --git a/release notes/v0.49.0.md b/release notes/v0.49.0.md index bcf2b936eb3..76d3ce19432 100644 --- a/release notes/v0.49.0.md +++ b/release notes/v0.49.0.md @@ -29,6 +29,7 @@ _what, why, and what this means for the user_ - [#3440](https://github.com/grafana/k6/pull/3440) use built-in certificates if none are provided by the OS. Thanks to `@mem` for wokring on it! - [browser#1135](https://github.com/grafana/xk6-browser/pull/1135) improves the array output from `console` in the k6 logs. +- [browser#1137](https://github.com/grafana/xk6-browser/pull/1137), [browser#1145](https://github.com/grafana/xk6-browser/pull/1145) improves the error messages displayed when Chrome or Chromium isn't found. ## Bug fixes From 2e426fdad2aee29d60afc67e5648436134de81a8 Mon Sep 17 00:00:00 2001 From: ankur22 Date: Mon, 8 Jan 2024 16:43:19 +0000 Subject: [PATCH 07/27] Add clear to locator PR in release notes --- release notes/v0.49.0.md | 50 +++++++++++++++++++++++++++++++++++++++- 1 file changed, 49 insertions(+), 1 deletion(-) diff --git a/release notes/v0.49.0.md b/release notes/v0.49.0.md index 76d3ce19432..c92048d83b7 100644 --- a/release notes/v0.49.0.md +++ b/release notes/v0.49.0.md @@ -15,7 +15,55 @@ k6 `v0.49.0` is here πŸŽ‰! This release includes: ## New features -_optional intro here_ +### Add `clear` to the `locator` class [browser#1149](https://github.com/grafana/xk6-browser/pull/1149) + +The new `clear` method on `locator` will clear 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/x/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(); +} +``` + +
### `` `#pr` From 5678f9a2b49ef1581082082f9889040d73b765b3 Mon Sep 17 00:00:00 2001 From: Ankur Date: Tue, 9 Jan 2024 11:45:33 +0000 Subject: [PATCH 08/27] Use experimental import Co-authored-by: ka3de --- release notes/v0.49.0.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/release notes/v0.49.0.md b/release notes/v0.49.0.md index c92048d83b7..4012283c8b0 100644 --- a/release notes/v0.49.0.md +++ b/release notes/v0.49.0.md @@ -24,7 +24,7 @@ The new `clear` method on `locator` will clear text boxes and input fields. This ```javascript import { check } from 'k6'; -import { browser } from 'k6/x/browser'; +import { browser } from 'k6/experimental/browser'; export const options = { scenarios: { From 4e0640dc59e4d56f4e506566380c68f429a9ee02 Mon Sep 17 00:00:00 2001 From: ka3de Date: Mon, 15 Jan 2024 10:14:14 +0100 Subject: [PATCH 09/27] Add browser tracing release notes (#3522) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Ankur Co-authored-by: Δ°nanΓ§ GΓΌmüş --- release notes/v0.49.0.md | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/release notes/v0.49.0.md b/release notes/v0.49.0.md index 4012283c8b0..ae849b5196a 100644 --- a/release notes/v0.49.0.md +++ b/release notes/v0.49.0.md @@ -65,9 +65,13 @@ export default async function() { -### `` `#pr` +### Add tracing to the browser module [browser#1100](https://github.com/grafana/xk6-browser/pull/1100) -_what, why, and what this means for the user_ +The browser module now generates traces that provide a representation of its inner workings, such as API methods executed (for example `browser.newPage` and `page.goto`), page navigations, and [Web Vitals](https://grafana.com/docs/k6/latest/using-k6-browser/metrics/#googles-core-web-vitals) measurements. + +Currently, the instrumented methods are a subset of all the methods exposed by the browser module API, but this will be extended in the future. + +The traces generation for the browser module depends on the overall `k6` traces option introduced in [v0.48.0](https://github.com/grafana/k6/releases/tag/v0.48.0). Check out the [documentation](https://grafana.com/docs/k6/latest/using-k6/k6-options/reference/#traces-output) to learn more about it. ### `` `#pr` @@ -76,6 +80,7 @@ _what, why, and what this means for the user_ ## UX improvements and enhancements - [#3440](https://github.com/grafana/k6/pull/3440) use built-in certificates if none are provided by the OS. Thanks to `@mem` for wokring on it! +- [browser#1104](https://github.com/grafana/xk6-browser/pull/1104) adds support for browser module traces metadata. Users can define *key-value* metadata that will be included as attributes in every generated span. - [browser#1135](https://github.com/grafana/xk6-browser/pull/1135) improves the array output from `console` in the k6 logs. - [browser#1137](https://github.com/grafana/xk6-browser/pull/1137), [browser#1145](https://github.com/grafana/xk6-browser/pull/1145) improves the error messages displayed when Chrome or Chromium isn't found. From 70f2d38ab57095ecf26d10d6a27f1218bfc2e5f8 Mon Sep 17 00:00:00 2001 From: ankur22 Date: Thu, 11 Jan 2024 14:23:50 +0000 Subject: [PATCH 10/27] Add browser 1152 to release v0.49.0 --- release notes/v0.49.0.md | 1 + 1 file changed, 1 insertion(+) diff --git a/release notes/v0.49.0.md b/release notes/v0.49.0.md index ae849b5196a..174223f4388 100644 --- a/release notes/v0.49.0.md +++ b/release notes/v0.49.0.md @@ -91,6 +91,7 @@ _what, why, and what this means for the user_ - [browser#1133](https://github.com/grafana/xk6-browser/pull/1133) fixes `BigInt` parsing. - [browser#1108](https://github.com/grafana/xk6-browser/pull/1108), [browser#1110](https://github.com/grafana/xk6-browser/pull/1110) fixes `isVisible` and `isHidden` so that it does not wait for an element to match with the given `selector`, allowing it to continue on with the test script when elements are not on the page. - [browser#1121](https://github.com/grafana/xk6-browser/pull/1121) fixes `dblClick` so that it works with `onDblClick` and performs two clicks on the specified element. +- [browser#1152](https://github.com/grafana/xk6-browser/pull/1152) fixes a nil pointer dereference when navigating around on SPA websites. ## Maintenance and internal improvements From 7c174c9925595f7c06d492199914480104d56228 Mon Sep 17 00:00:00 2001 From: Mihail Stoykov Date: Mon, 15 Jan 2024 11:48:49 +0200 Subject: [PATCH 11/27] Add more internal changes --- release notes/v0.49.0.md | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/release notes/v0.49.0.md b/release notes/v0.49.0.md index 174223f4388..0c6c373d66d 100644 --- a/release notes/v0.49.0.md +++ b/release notes/v0.49.0.md @@ -95,10 +95,20 @@ _what, why, and what this means for the user_ ## Maintenance and internal improvements +- [#3204](https://github.com/grafana/k6/pull/3204) Internal refactor to make future distributed execution work easier. With a small fix to tests in [#3531](https://github.com/grafana/k6/pull/3531). Thanks to @na-- :tada:. - A lot of lint fixes through out the k6 code base [#3460](https://github.com/grafana/k6/pull/3460), [#3462](https://github.com/grafana/k6/pull/3462), [#3463](https://github.com/grafana/k6/pull/3463), [#3478](https://github.com/grafana/k6/pull/3478), [#3479](https://github.com/grafana/k6/pull/3479), [#3480](https://github.com/grafana/k6/pull/3480), [#3481](https://github.com/grafana/k6/pull/3481), [#3482](https://github.com/grafana/k6/pull/3482), [#3483](https://github.com/grafana/k6/pull/3483), [#3484](https://github.com/grafana/k6/pull/3484), [#3485](https://github.com/grafana/k6/pull/3485), [#3495](https://github.com/grafana/k6/pull/3495). +- [#3473](https://github.com/grafana/k6/pull/3473) Refinements to the release process. +- Dependency updates across k6 [#3500](https://github.com/grafana/k6/pull/3500), [#3501](https://github.com/grafana/k6/pull/3501), [#3502](https://github.com/grafana/k6/pull/3502), [#3503](https://github.com/grafana/k6/pull/3503), [#3509](https://github.com/grafana/k6/pull/3509), [#3513](https://github.com/grafana/k6/pull/3513), [#3537](https://github.com/grafana/k6/pull/3537), [#3539](https://github.com/grafana/k6/pull/3539), [#3540](https://github.com/grafana/k6/pull/3540). +- [#3489](https://github.com/grafana/k6/pull/3489) Assign pull-requests via CODEOWNERS instead of with a specific github action. +- [#3496](https://github.com/grafana/k6/pull/3496) Check for security issues with a scheduled trivy scans. +- [#3517](https://github.com/grafana/k6/pull/3517) Add some units tests to the cloadapi package. This is the first contribution by external contributor @nilskch. Thanks for this @nilskch :bow:. +- [#3520](https://github.com/grafana/k6/pull/3520) Stop using deprecated by golang net.Dialer.DualStack option. +- [#3526](https://github.com/grafana/k6/pull/3526) Some refactors to js package test around `open` and `require` and their handling of paths. +- [#3527](https://github.com/grafana/k6/pull/3527) Generate test certificates for more tests during the test. This among other things fixes the tests on MacOS. - [browser#1134](https://github.com/grafana/xk6-browser/pull/1134) adds a new error type when parsing objects. - [browser#1107](https://github.com/grafana/xk6-browser/pull/1107), [browser#1109](https://github.com/grafana/xk6-browser/pull/1109) refactor internals. + ## _Optional_ Roadmap _Discussion of future plans_ From d22489efa40893a7749b14b307830f2c9ac38f1d Mon Sep 17 00:00:00 2001 From: Mihail Stoykov Date: Mon, 15 Jan 2024 12:10:20 +0200 Subject: [PATCH 12/27] Add other changes and some skeleton --- release notes/v0.49.0.md | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/release notes/v0.49.0.md b/release notes/v0.49.0.md index 0c6c373d66d..772a9c1212e 100644 --- a/release notes/v0.49.0.md +++ b/release notes/v0.49.0.md @@ -73,12 +73,23 @@ Currently, the instrumented methods are a subset of all the methods exposed by t The traces generation for the browser module depends on the overall `k6` traces option introduced in [v0.48.0](https://github.com/grafana/k6/releases/tag/v0.48.0). Check out the [documentation](https://grafana.com/docs/k6/latest/using-k6/k6-options/reference/#traces-output) to learn more about it. -### `` `#pr` +### Experimental gRPC module being merged back in core [#3490](https://github.com/grafana/k6/pull/3490) + +// TODO fill with info + +### k6/html: Extract selection from element [#3519](https://github.com/grafana/k6/pull/3519) + +// TODO fill with info + +### Collect usage data on imported internal modules and outputs [#3525](https://github.com/grafana/k6/pull/3525) + +// TODO fill with info + -_what, why, and what this means for the user_ ## UX improvements and enhancements +- [#3529](https://github.com/grafana/k6/pull/3529) Actually enable by default the k6 cloud traces output. - [#3440](https://github.com/grafana/k6/pull/3440) use built-in certificates if none are provided by the OS. Thanks to `@mem` for wokring on it! - [browser#1104](https://github.com/grafana/xk6-browser/pull/1104) adds support for browser module traces metadata. Users can define *key-value* metadata that will be included as attributes in every generated span. - [browser#1135](https://github.com/grafana/xk6-browser/pull/1135) improves the array output from `console` in the k6 logs. From 8d532b8532a510a8336bf828f1ed0af15c0b7499 Mon Sep 17 00:00:00 2001 From: Oleg Bespalov Date: Mon, 15 Jan 2024 14:07:11 +0100 Subject: [PATCH 13/27] Graduation of the k6/experimental/grpc --- release notes/v0.49.0.md | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/release notes/v0.49.0.md b/release notes/v0.49.0.md index 772a9c1212e..a839543a9a7 100644 --- a/release notes/v0.49.0.md +++ b/release notes/v0.49.0.md @@ -73,9 +73,13 @@ Currently, the instrumented methods are a subset of all the methods exposed by t The traces generation for the browser module depends on the overall `k6` traces option introduced in [v0.48.0](https://github.com/grafana/k6/releases/tag/v0.48.0). Check out the [documentation](https://grafana.com/docs/k6/latest/using-k6/k6-options/reference/#traces-output) to learn more about it. -### Experimental gRPC module being merged back in core [#3490](https://github.com/grafana/k6/pull/3490) +### gRPC streaming API becomes part of the k6 core [#3490](https://github.com/grafana/k6/pull/3490) -// TODO fill with info +With this release, gRPC's streaming API becomes part of the core's `k6/net/grpc` module. The experimental `k6/experimental/grpc` has been back-merged into the core. + +You could still use import `k6/experimental/grpc` for a couple of releases, but it is deprecated and will be removed in the future (planned in k6 version `v0.51.0`). + +The migration is straightforward. Just replace `k6/experimental/grpc` with `k6/net/grpc` in your script imports, and the code should work as before. ### k6/html: Extract selection from element [#3519](https://github.com/grafana/k6/pull/3519) From 3429402fb6ef78014fe8b5b886aa6fc5b5c0178a Mon Sep 17 00:00:00 2001 From: Mihail Stoykov <312246+mstoykov@users.noreply.github.com> Date: Mon, 15 Jan 2024 18:10:45 +0200 Subject: [PATCH 14/27] Apply suggestions from code review Co-authored-by: Oleg Bespalov --- release notes/v0.49.0.md | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/release notes/v0.49.0.md b/release notes/v0.49.0.md index a839543a9a7..42286f2121d 100644 --- a/release notes/v0.49.0.md +++ b/release notes/v0.49.0.md @@ -1,18 +1,20 @@ k6 `v0.49.0` is here πŸŽ‰! This release includes: -- (_optional_) `` -- `` (_one or multiple bullets_) +- clear to the locator classes for the browser module +- gRPC experimental module being merged back +- being able to get the selection from an element in k6/html +- collect internal module and outputs used by a script +- getting `k6/experimental/timers` ready to be stabalized +- a bunch of internal changes, most which are fixing lint errors, but also making MacOS test work :tada: ## Breaking changes -- [#3494](https://github.com/grafana/k6/pull/3494) stop pushing `loadimpact/k6` docker image. If you are still using it is recommend that you start using `grafana/k6` +- [#3494](https://github.com/grafana/k6/pull/3494) stops pushing `loadimpact/k6` docker image. If you still use it please migrate to the `grafana/k6` - [browser#1111](https://github.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. -### (_optional h3_) `` `#pr` - ## New features ### Add `clear` to the `locator` class [browser#1149](https://github.com/grafana/xk6-browser/pull/1149) @@ -94,7 +96,7 @@ The migration is straightforward. Just replace `k6/experimental/grpc` with `k6/n ## UX improvements and enhancements - [#3529](https://github.com/grafana/k6/pull/3529) Actually enable by default the k6 cloud traces output. -- [#3440](https://github.com/grafana/k6/pull/3440) use built-in certificates if none are provided by the OS. Thanks to `@mem` for wokring on it! +- [#3440](https://github.com/grafana/k6/pull/3440) adds a fallback for using built-in certificates if the OS provides none. Thanks to `@mem` for working on it! - [browser#1104](https://github.com/grafana/xk6-browser/pull/1104) adds support for browser module traces metadata. Users can define *key-value* metadata that will be included as attributes in every generated span. - [browser#1135](https://github.com/grafana/xk6-browser/pull/1135) improves the array output from `console` in the k6 logs. - [browser#1137](https://github.com/grafana/xk6-browser/pull/1137), [browser#1145](https://github.com/grafana/xk6-browser/pull/1145) improves the error messages displayed when Chrome or Chromium isn't found. @@ -120,6 +122,7 @@ The migration is straightforward. Just replace `k6/experimental/grpc` with `k6/n - [#3520](https://github.com/grafana/k6/pull/3520) Stop using deprecated by golang net.Dialer.DualStack option. - [#3526](https://github.com/grafana/k6/pull/3526) Some refactors to js package test around `open` and `require` and their handling of paths. - [#3527](https://github.com/grafana/k6/pull/3527) Generate test certificates for more tests during the test. This among other things fixes the tests on MacOS. +- [#3528](https://github.com/grafana/k6/pull/3528) Given the above change we also enabled test on MacOS in the github actions. - [browser#1134](https://github.com/grafana/xk6-browser/pull/1134) adds a new error type when parsing objects. - [browser#1107](https://github.com/grafana/xk6-browser/pull/1107), [browser#1109](https://github.com/grafana/xk6-browser/pull/1109) refactor internals. From fd7192136a14eda4e0b2b575c24f264ae6316291 Mon Sep 17 00:00:00 2001 From: Mihail Stoykov Date: Tue, 16 Jan 2024 11:13:27 +0200 Subject: [PATCH 15/27] Add release notes for #3519 --- release notes/v0.49.0.md | 44 +++++++++++++++++++++++++++++++++++++++- 1 file changed, 43 insertions(+), 1 deletion(-) diff --git a/release notes/v0.49.0.md b/release notes/v0.49.0.md index 42286f2121d..630647cf44c 100644 --- a/release notes/v0.49.0.md +++ b/release notes/v0.49.0.md @@ -85,7 +85,49 @@ The migration is straightforward. Just replace `k6/experimental/grpc` with `k6/n ### k6/html: Extract selection from element [#3519](https://github.com/grafana/k6/pull/3519) -// TODO fill with info +[`k6/html`](https://grafana.com/docs/k6/latest/javascript-api/k6-html/) has for been around for a while and allows you to search within an html document with an jquery-like API called [Selection](https://grafana.com/docs/k6/latest/javascript-api/k6-html/selection/), and also has support for the more standard [Element](https://grafana.com/docs/k6/latest/javascript-api/k6-html/element/) that represents DOM element. + +For a long time you get an Element from a Selection using the [`.get(index)`](https://grafana.com/docs/k6/latest/javascript-api/k6-html/selection/selection-get/), but you couldn't get back to a Selection from an Element. + +This happens to not be a common case, but one that in some cases requires rewrite of the code quite a lot. + +```javascript +let li = http.get("https://test.k6.io").html().find("li"); +li.each(function(_, element) { + // here element is an element not a selection + // but what if for each li we want to select something more? + // in jquery that will be: + let container = $(element).closest('ul.header-icons'); + // but what should `$` do? + // in a browser there is only 1 html document that you have access to + // in k6 though you can be working with multiple ones, so `$` can't know which one it should + // work against +}); +``` + +In order to support the above you can just use the selection, without going to element as in: + +```javascript +let li = http.get("https://test.k6.io").html().find("li"); +for (; li.size() > 0; li = li.next()) { + let ul = li.closest('ul.header-icons'); // li here is still a selection and we iterate over it. +} +``` + +This is not always possible though, and arguably isn't what most users will naturally do. + +Because of this we have now added a new [`.selection()`](https://grafana.com/docs/k6/latest/javascript-api/k6-html/element/element-selection/) which returns a selection for it's element. + + +```javascript + let li = http.get("https://test.k6.io").html().find("li"); + li.each(function(_, element) { + let container = element.selection().closest('ul.header-icons'); + // .. more code + }); +``` + +Thanks to @Azhovan! :bow: :tada: ### Collect usage data on imported internal modules and outputs [#3525](https://github.com/grafana/k6/pull/3525) From 8ec3e77c24efeec9bbb61d1c57cb66e3fd9ed04d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Th=C3=A9o=20Crevon?= Date: Tue, 16 Jan 2024 15:42:38 +0100 Subject: [PATCH 16/27] Add Dashboard information to v0.49.0 release notes (#3544) * Add the web-dashboard to v0.49.0 release notes * Apply suggestions from code review * Apply suggestions from code review --- release notes/v0.49.0.md | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) diff --git a/release notes/v0.49.0.md b/release notes/v0.49.0.md index 630647cf44c..fe0dc1c7c45 100644 --- a/release notes/v0.49.0.md +++ b/release notes/v0.49.0.md @@ -1,5 +1,6 @@ k6 `v0.49.0` is here πŸŽ‰! This release includes: +- a built-in web-dashboard displaying test results in real-time - clear to the locator classes for the browser module - gRPC experimental module being merged back - being able to get the selection from an element in k6/html @@ -17,6 +18,31 @@ k6 `v0.49.0` is here πŸŽ‰! This release includes: ## New features +### Web Dashboard + +The new 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 continues to evolve. + +```bash +K6_WEB_DASHBOARD=true k6 run script.js +``` + +Once enabled and the test script is running, navigate to [http://localhost:6565](http://localhost:6565) in your web browser to access the dashboard. + +![k6 Web Dashboard Overview](https://github.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](https://github.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 located in the top right corner of the dashboard. + ### Add `clear` to the `locator` class [browser#1149](https://github.com/grafana/xk6-browser/pull/1149) The new `clear` method on `locator` will clear 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. From b6e3886aab99ec21702bb2e41a8702c806bfc8f2 Mon Sep 17 00:00:00 2001 From: Ivan <2103732+codebien@users.noreply.github.com> Date: Tue, 16 Jan 2024 16:08:32 +0100 Subject: [PATCH 17/27] Changelog for the report updates (#3546) Changelog for the data collection updates --- release notes/v0.49.0.md | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/release notes/v0.49.0.md b/release notes/v0.49.0.md index fe0dc1c7c45..a25adc7ab9f 100644 --- a/release notes/v0.49.0.md +++ b/release notes/v0.49.0.md @@ -157,9 +157,10 @@ Thanks to @Azhovan! :bow: :tada: ### Collect usage data on imported internal modules and outputs [#3525](https://github.com/grafana/k6/pull/3525) -// TODO fill with info - +Added the data collection of the used modules and outputs when the [usage report](https://grafana.com/docs/k6/latest/misc/usage-collection) is enabled. The data collection is only related to the built-in k6 modules and outputs. Private, custom modules and extensions [are never collected](https://github.com/grafana/k6/blob/f35e67902605877ebf2c5e9c8673cd7faf4cdc1e/cmd/report.go#L33-L57). The usage report is enabled by default in k6, but it is possible to opt-out using the [no-usage-report](https://grafana.com/docs/k6/latest/using-k6/k6-options/reference/#no-usage-report) option. +We always want to improve the product, but at the same time we need to pay attention where we allocate our resources. Having data of what are the most used modules and outputs give us a better confidence to make decisions because we are supported by data. +It will let us know what is the percentage of our users that will benefit from the introduction of a new feature and on the other side, in case of a breaking change, how many of them would be impacted. ## UX improvements and enhancements From c9328f5be5cce82889905960572cfb5ce49b3919 Mon Sep 17 00:00:00 2001 From: Mihail Stoykov <312246+mstoykov@users.noreply.github.com> Date: Thu, 18 Jan 2024 10:32:42 +0200 Subject: [PATCH 18/27] Apply suggestions from code review MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: ThΓ©o Crevon --- release notes/v0.49.0.md | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/release notes/v0.49.0.md b/release notes/v0.49.0.md index a25adc7ab9f..424b7874826 100644 --- a/release notes/v0.49.0.md +++ b/release notes/v0.49.0.md @@ -3,10 +3,10 @@ k6 `v0.49.0` is here πŸŽ‰! This release includes: - a built-in web-dashboard displaying test results in real-time - clear to the locator classes for the browser module - gRPC experimental module being merged back -- being able to get the selection from an element in k6/html -- collect internal module and outputs used by a script +- being able to get the selection from an element in `k6/html` +- collect internal modules and outputs used by a script - getting `k6/experimental/timers` ready to be stabalized -- a bunch of internal changes, most which are fixing lint errors, but also making MacOS test work :tada: +- a bunch of internal changes, most of which are fixing lint errors, but also making MacOS test work :tada: ## Breaking changes @@ -111,9 +111,9 @@ The migration is straightforward. Just replace `k6/experimental/grpc` with `k6/n ### k6/html: Extract selection from element [#3519](https://github.com/grafana/k6/pull/3519) -[`k6/html`](https://grafana.com/docs/k6/latest/javascript-api/k6-html/) has for been around for a while and allows you to search within an html document with an jquery-like API called [Selection](https://grafana.com/docs/k6/latest/javascript-api/k6-html/selection/), and also has support for the more standard [Element](https://grafana.com/docs/k6/latest/javascript-api/k6-html/element/) that represents DOM element. +[`k6/html`](https://grafana.com/docs/k6/latest/javascript-api/k6-html/) has been around for a while and allows you to search within an HTML document with a jquery-like API called [Selection](https://grafana.com/docs/k6/latest/javascript-api/k6-html/selection/), and also has support for the more standard [Element](https://grafana.com/docs/k6/latest/javascript-api/k6-html/element/) that represents DOM element. -For a long time you get an Element from a Selection using the [`.get(index)`](https://grafana.com/docs/k6/latest/javascript-api/k6-html/selection/selection-get/), but you couldn't get back to a Selection from an Element. +For a long time, you could get an Element from a Selection using the [`.get(index)`](https://grafana.com/docs/k6/latest/javascript-api/k6-html/selection/selection-get/), but you couldn't get back to a Selection from an Element. This happens to not be a common case, but one that in some cases requires rewrite of the code quite a lot. @@ -142,7 +142,7 @@ for (; li.size() > 0; li = li.next()) { This is not always possible though, and arguably isn't what most users will naturally do. -Because of this we have now added a new [`.selection()`](https://grafana.com/docs/k6/latest/javascript-api/k6-html/element/element-selection/) which returns a selection for it's element. +Because of this, we have now added a new [`.selection()`](https://grafana.com/docs/k6/latest/javascript-api/k6-html/element/element-selection/) which returns a selection for it's element. ```javascript From f3cd78d08b43e9a875a10b107472fde76c258290 Mon Sep 17 00:00:00 2001 From: Mihail Stoykov <312246+mstoykov@users.noreply.github.com> Date: Thu, 18 Jan 2024 10:33:12 +0200 Subject: [PATCH 19/27] Apply suggestions from code review MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: ThΓ©o Crevon --- release notes/v0.49.0.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/release notes/v0.49.0.md b/release notes/v0.49.0.md index 424b7874826..146d1a99980 100644 --- a/release notes/v0.49.0.md +++ b/release notes/v0.49.0.md @@ -5,7 +5,7 @@ k6 `v0.49.0` is here πŸŽ‰! This release includes: - gRPC experimental module being merged back - being able to get the selection from an element in `k6/html` - collect internal modules and outputs used by a script -- getting `k6/experimental/timers` ready to be stabalized +- getting `k6/experimental/timers` ready to be stabilized - a bunch of internal changes, most of which are fixing lint errors, but also making MacOS test work :tada: @@ -115,7 +115,7 @@ The migration is straightforward. Just replace `k6/experimental/grpc` with `k6/n For a long time, you could get an Element from a Selection using the [`.get(index)`](https://grafana.com/docs/k6/latest/javascript-api/k6-html/selection/selection-get/), but you couldn't get back to a Selection from an Element. -This happens to not be a common case, but one that in some cases requires rewrite of the code quite a lot. +This is not a common case, but one that requires rewrite of the code quite a lot. ```javascript let li = http.get("https://test.k6.io").html().find("li"); From 4aedeb8441792c66eafac92028eb0e9db126261a Mon Sep 17 00:00:00 2001 From: Mihail Stoykov <312246+mstoykov@users.noreply.github.com> Date: Thu, 18 Jan 2024 10:39:28 +0200 Subject: [PATCH 20/27] Update release notes/v0.49.0.md --- release notes/v0.49.0.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/release notes/v0.49.0.md b/release notes/v0.49.0.md index 146d1a99980..e811e713b77 100644 --- a/release notes/v0.49.0.md +++ b/release notes/v0.49.0.md @@ -1,7 +1,7 @@ k6 `v0.49.0` is here πŸŽ‰! This release includes: - a built-in web-dashboard displaying test results in real-time -- clear to the locator classes for the browser module +- add `clear` functionality to the `locator` classes within the browser module - gRPC experimental module being merged back - being able to get the selection from an element in `k6/html` - collect internal modules and outputs used by a script From 723a9b7277a703dfb2ea3a08b85dd3ba15044cf9 Mon Sep 17 00:00:00 2001 From: Oleg Bespalov Date: Thu, 18 Jan 2024 11:03:57 +0100 Subject: [PATCH 21/27] Mention documentation URLs switching --- release notes/v0.49.0.md | 1 + 1 file changed, 1 insertion(+) diff --git a/release notes/v0.49.0.md b/release notes/v0.49.0.md index e811e713b77..2b67d792940 100644 --- a/release notes/v0.49.0.md +++ b/release notes/v0.49.0.md @@ -169,6 +169,7 @@ It will let us know what is the percentage of our users that will benefit from t - [browser#1104](https://github.com/grafana/xk6-browser/pull/1104) adds support for browser module traces metadata. Users can define *key-value* metadata that will be included as attributes in every generated span. - [browser#1135](https://github.com/grafana/xk6-browser/pull/1135) improves the array output from `console` in the k6 logs. - [browser#1137](https://github.com/grafana/xk6-browser/pull/1137), [browser#1145](https://github.com/grafana/xk6-browser/pull/1145) improves the error messages displayed when Chrome or Chromium isn't found. +- [#3543](https://github.com/grafana/k6/pull/3543) switches documentation URLs to the `grafana.com/docs/k6/latest/`. ## Bug fixes From cabc7bf29c77fce699cbb46e576163680151dc4d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Th=C3=A9o=20Crevon?= Date: Thu, 18 Jan 2024 11:15:21 +0100 Subject: [PATCH 22/27] Update release notes/v0.49.0.md Co-authored-by: Ivan <2103732+codebien@users.noreply.github.com> --- release notes/v0.49.0.md | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/release notes/v0.49.0.md b/release notes/v0.49.0.md index 2b67d792940..1102f519fae 100644 --- a/release notes/v0.49.0.md +++ b/release notes/v0.49.0.md @@ -25,8 +25,7 @@ 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 continues to evolve. +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 continues to evolve. ```bash K6_WEB_DASHBOARD=true k6 run script.js From 9cd6f10eabf96f9187c5d4a05f15fce07f3d4145 Mon Sep 17 00:00:00 2001 From: Mihail Stoykov <312246+mstoykov@users.noreply.github.com> Date: Thu, 25 Jan 2024 10:50:36 +0200 Subject: [PATCH 23/27] Apply suggestions from code review Co-authored-by: Heitor Tashiro Sergent Co-authored-by: Ivan <2103732+codebien@users.noreply.github.com> --- release notes/v0.49.0.md | 73 ++++++++++++++++++++-------------------- 1 file changed, 37 insertions(+), 36 deletions(-) diff --git a/release notes/v0.49.0.md b/release notes/v0.49.0.md index 1102f519fae..684a21b33c6 100644 --- a/release notes/v0.49.0.md +++ b/release notes/v0.49.0.md @@ -1,21 +1,18 @@ k6 `v0.49.0` is here πŸŽ‰! This release includes: -- a built-in web-dashboard displaying test results in real-time -- add `clear` functionality to the `locator` classes within the browser module -- gRPC experimental module being merged back -- being able to get the selection from an element in `k6/html` -- collect internal modules and outputs used by a script -- getting `k6/experimental/timers` ready to be stabilized -- a bunch of internal changes, most of which are fixing lint errors, but also making MacOS test work :tada: +- Add a built-in web dashboard that displays test results in real time. +- Add `clear` functionality to the browser module's `locator` classes. +- Merge the gRPC experimental module back into the gRPC core module. +- Add the ability to get the selection from an element in `k6/html`. +- Collect internal modules and outputs used by a script. +- Get `k6/experimental/timers` ready to be stabilized. ## Breaking changes - -- [#3494](https://github.com/grafana/k6/pull/3494) stops pushing `loadimpact/k6` docker image. If you still use it please migrate to the `grafana/k6` +- [#3494](https://github.com/grafana/k6/pull/3494) stops pushing `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://github.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 @@ -25,7 +22,7 @@ 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 continues to evolve. +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 @@ -40,11 +37,15 @@ Once enabled and the test script is running, navigate to [http://localhost:6565] The web dashboard also offers an [HTML test report](https://github.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 located in the top right corner of the dashboard. +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://github.com/grafana/xk6-browser/pull/1149) -The new `clear` method on `locator` will clear 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. +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. @@ -104,17 +105,17 @@ The traces generation for the browser module depends on the overall `k6` traces With this release, gRPC's streaming API becomes part of the core's `k6/net/grpc` module. The experimental `k6/experimental/grpc` has been back-merged into the core. -You could still use import `k6/experimental/grpc` for a couple of releases, but it is deprecated and will be removed in the future (planned in k6 version `v0.51.0`). +You can still use import `k6/experimental/grpc` for a couple of releases, but it's deprecated and will be removed in the future (planned in k6 version `v0.51.0`). -The migration is straightforward. Just replace `k6/experimental/grpc` with `k6/net/grpc` in your script imports, and the code should work as before. +To migrate your scripts, replace `k6/experimental/grpc` with `k6/net/grpc` in your script imports, and the code should work as before. ### k6/html: Extract selection from element [#3519](https://github.com/grafana/k6/pull/3519) -[`k6/html`](https://grafana.com/docs/k6/latest/javascript-api/k6-html/) has been around for a while and allows you to search within an HTML document with a jquery-like API called [Selection](https://grafana.com/docs/k6/latest/javascript-api/k6-html/selection/), and also has support for the more standard [Element](https://grafana.com/docs/k6/latest/javascript-api/k6-html/element/) that represents DOM element. +[`k6/html`](https://grafana.com/docs/k6/latest/javascript-api/k6-html/) has been around for a while and allows you to search within an HTML document with a jQuery-like API called [Selection](https://grafana.com/docs/k6/latest/javascript-api/k6-html/selection/), and also has support for the more standard [Element](https://grafana.com/docs/k6/latest/javascript-api/k6-html/element/) that represents DOM element. For a long time, you could get an Element from a Selection using the [`.get(index)`](https://grafana.com/docs/k6/latest/javascript-api/k6-html/selection/selection-get/), but you couldn't get back to a Selection from an Element. -This is not a common case, but one that requires rewrite of the code quite a lot. +This is not a common case, but one that requires quite a bit of code. For example, see the following jQuery snippet: ```javascript let li = http.get("https://test.k6.io").html().find("li"); @@ -130,7 +131,7 @@ li.each(function(_, element) { }); ``` -In order to support the above you can just use the selection, without going to element as in: +In order to support the above example, you can use `selection`, without going to the element: ```javascript let li = http.get("https://test.k6.io").html().find("li"); @@ -141,7 +142,7 @@ for (; li.size() > 0; li = li.next()) { This is not always possible though, and arguably isn't what most users will naturally do. -Because of this, we have now added a new [`.selection()`](https://grafana.com/docs/k6/latest/javascript-api/k6-html/element/element-selection/) which returns a selection for it's element. +Because of this, we have now added a new [`.selection()`](https://grafana.com/docs/k6/latest/javascript-api/k6-html/element/element-selection/) which returns a selection for its element. ```javascript @@ -156,42 +157,42 @@ Thanks to @Azhovan! :bow: :tada: ### Collect usage data on imported internal modules and outputs [#3525](https://github.com/grafana/k6/pull/3525) -Added the data collection of the used modules and outputs when the [usage report](https://grafana.com/docs/k6/latest/misc/usage-collection) is enabled. The data collection is only related to the built-in k6 modules and outputs. Private, custom modules and extensions [are never collected](https://github.com/grafana/k6/blob/f35e67902605877ebf2c5e9c8673cd7faf4cdc1e/cmd/report.go#L33-L57). The usage report is enabled by default in k6, but it is possible to opt-out using the [no-usage-report](https://grafana.com/docs/k6/latest/using-k6/k6-options/reference/#no-usage-report) option. +k6 now collects usage data of the modules and outputs that are being used when the [usage report](https://grafana.com/docs/k6/latest/misc/usage-collection) is enabled. The data collection is only related to the built-in k6 modules and outputs. Private, custom modules and extensions [are never collected](https://github.com/grafana/k6/blob/f35e67902605877ebf2c5e9c8673cd7faf4cdc1e/cmd/report.go#L33-L57). The usage report is enabled by default in k6, but it is possible to opt-out using the [no-usage-report](https://grafana.com/docs/k6/latest/using-k6/k6-options/reference/#no-usage-report) option. -We always want to improve the product, but at the same time we need to pay attention where we allocate our resources. Having data of what are the most used modules and outputs give us a better confidence to make decisions because we are supported by data. -It will let us know what is the percentage of our users that will benefit from the introduction of a new feature and on the other side, in case of a breaking change, how many of them would be impacted. +We always want to improve the product, but at the same time, we need to pay attention to where we allocate our resources. Having data of what are the most used modules and outputs gives us better confidence to make decisions because we are supported by data. +The data can let us know what percentage of our users will benefit from the introduction of a new feature and also, how many of them would be impacted in case of a breaking change. ## UX improvements and enhancements -- [#3529](https://github.com/grafana/k6/pull/3529) Actually enable by default the k6 cloud traces output. +- [#3529](https://github.com/grafana/k6/pull/3529) enables the k6 cloud traces output by default. - [#3440](https://github.com/grafana/k6/pull/3440) adds a fallback for using built-in certificates if the OS provides none. Thanks to `@mem` for working on it! - [browser#1104](https://github.com/grafana/xk6-browser/pull/1104) adds support for browser module traces metadata. Users can define *key-value* metadata that will be included as attributes in every generated span. - [browser#1135](https://github.com/grafana/xk6-browser/pull/1135) improves the array output from `console` in the k6 logs. - [browser#1137](https://github.com/grafana/xk6-browser/pull/1137), [browser#1145](https://github.com/grafana/xk6-browser/pull/1145) improves the error messages displayed when Chrome or Chromium isn't found. -- [#3543](https://github.com/grafana/k6/pull/3543) switches documentation URLs to the `grafana.com/docs/k6/latest/`. +- [#3543](https://github.com/grafana/k6/pull/3543) replaces documentation URLs to `grafana.com/docs/k6/latest/`. ## Bug fixes -- [#3485](https://github.com/grafana/k6/pull/3485) fixes the rest API always logging it returned 200, which was found as part of fixing lint issues in the code. +- [#3485](https://github.com/grafana/k6/pull/3485) fixes the REST API always logging a 200 status code response, which was found as part of fixing lint issues in the code. - [browser#1129](https://github.com/grafana/xk6-browser/pull/1129) mitigates the risk of panics when the website under test uses the `console`. - [browser#1133](https://github.com/grafana/xk6-browser/pull/1133) fixes `BigInt` parsing. -- [browser#1108](https://github.com/grafana/xk6-browser/pull/1108), [browser#1110](https://github.com/grafana/xk6-browser/pull/1110) fixes `isVisible` and `isHidden` so that it does not wait for an element to match with the given `selector`, allowing it to continue on with the test script when elements are not on the page. +- [browser#1108](https://github.com/grafana/xk6-browser/pull/1108), [browser#1110](https://github.com/grafana/xk6-browser/pull/1110) fixes `isVisible` and `isHidden` so that it doesn't wait for an element to match with the given `selector`, allowing it to continue on with the test script when elements are not on the page. - [browser#1121](https://github.com/grafana/xk6-browser/pull/1121) fixes `dblClick` so that it works with `onDblClick` and performs two clicks on the specified element. - [browser#1152](https://github.com/grafana/xk6-browser/pull/1152) fixes a nil pointer dereference when navigating around on SPA websites. ## Maintenance and internal improvements -- [#3204](https://github.com/grafana/k6/pull/3204) Internal refactor to make future distributed execution work easier. With a small fix to tests in [#3531](https://github.com/grafana/k6/pull/3531). Thanks to @na-- :tada:. -- A lot of lint fixes through out the k6 code base [#3460](https://github.com/grafana/k6/pull/3460), [#3462](https://github.com/grafana/k6/pull/3462), [#3463](https://github.com/grafana/k6/pull/3463), [#3478](https://github.com/grafana/k6/pull/3478), [#3479](https://github.com/grafana/k6/pull/3479), [#3480](https://github.com/grafana/k6/pull/3480), [#3481](https://github.com/grafana/k6/pull/3481), [#3482](https://github.com/grafana/k6/pull/3482), [#3483](https://github.com/grafana/k6/pull/3483), [#3484](https://github.com/grafana/k6/pull/3484), [#3485](https://github.com/grafana/k6/pull/3485), [#3495](https://github.com/grafana/k6/pull/3495). -- [#3473](https://github.com/grafana/k6/pull/3473) Refinements to the release process. +- [#3204](https://github.com/grafana/k6/pull/3204) internal refactor to make future distributed execution work easier. With a small fix to tests in [#3531](https://github.com/grafana/k6/pull/3531). Thanks to @na-- :tada:. +- Lint fixes throughout the k6 code base [#3460](https://github.com/grafana/k6/pull/3460), [#3462](https://github.com/grafana/k6/pull/3462), [#3463](https://github.com/grafana/k6/pull/3463), [#3478](https://github.com/grafana/k6/pull/3478), [#3479](https://github.com/grafana/k6/pull/3479), [#3480](https://github.com/grafana/k6/pull/3480), [#3481](https://github.com/grafana/k6/pull/3481), [#3482](https://github.com/grafana/k6/pull/3482), [#3483](https://github.com/grafana/k6/pull/3483), [#3484](https://github.com/grafana/k6/pull/3484), [#3485](https://github.com/grafana/k6/pull/3485), [#3495](https://github.com/grafana/k6/pull/3495). +- [#3473](https://github.com/grafana/k6/pull/3473) refinements to the release process. - Dependency updates across k6 [#3500](https://github.com/grafana/k6/pull/3500), [#3501](https://github.com/grafana/k6/pull/3501), [#3502](https://github.com/grafana/k6/pull/3502), [#3503](https://github.com/grafana/k6/pull/3503), [#3509](https://github.com/grafana/k6/pull/3509), [#3513](https://github.com/grafana/k6/pull/3513), [#3537](https://github.com/grafana/k6/pull/3537), [#3539](https://github.com/grafana/k6/pull/3539), [#3540](https://github.com/grafana/k6/pull/3540). -- [#3489](https://github.com/grafana/k6/pull/3489) Assign pull-requests via CODEOWNERS instead of with a specific github action. -- [#3496](https://github.com/grafana/k6/pull/3496) Check for security issues with a scheduled trivy scans. -- [#3517](https://github.com/grafana/k6/pull/3517) Add some units tests to the cloadapi package. This is the first contribution by external contributor @nilskch. Thanks for this @nilskch :bow:. -- [#3520](https://github.com/grafana/k6/pull/3520) Stop using deprecated by golang net.Dialer.DualStack option. -- [#3526](https://github.com/grafana/k6/pull/3526) Some refactors to js package test around `open` and `require` and their handling of paths. -- [#3527](https://github.com/grafana/k6/pull/3527) Generate test certificates for more tests during the test. This among other things fixes the tests on MacOS. -- [#3528](https://github.com/grafana/k6/pull/3528) Given the above change we also enabled test on MacOS in the github actions. +- [#3489](https://github.com/grafana/k6/pull/3489) assign pull-requests via CODEOWNERS instead of with a specific GitHub Action. +- [#3496](https://github.com/grafana/k6/pull/3496) checks for security issues with a scheduled trivy scan. +- [#3517](https://github.com/grafana/k6/pull/3517) adds unit tests to the cloadapi package. This is the first contribution by external contributor @nilskch. Thanks for this @nilskch :bow:. +- [#3520](https://github.com/grafana/k6/pull/3520) stops using deprecated by golang net.Dialer.DualStack option. +- [#3526](https://github.com/grafana/k6/pull/3526) refactors to JavaScript package test around `open` and `require` and their handling of paths. +- [#3527](https://github.com/grafana/k6/pull/3527) generates test certificates for more tests during the test. This, among other things, fixes macOS tests. +- [#3528](https://github.com/grafana/k6/pull/3528) enables macOS tests in GitHub Actions. - [browser#1134](https://github.com/grafana/xk6-browser/pull/1134) adds a new error type when parsing objects. - [browser#1107](https://github.com/grafana/xk6-browser/pull/1107), [browser#1109](https://github.com/grafana/xk6-browser/pull/1109) refactor internals. From dbffb6b11b572f299d06455f77e4001be33663ec Mon Sep 17 00:00:00 2001 From: Mihail Stoykov <312246+mstoykov@users.noreply.github.com> Date: Thu, 25 Jan 2024 10:51:13 +0200 Subject: [PATCH 24/27] Update release notes/v0.49.0.md --- release notes/v0.49.0.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/release notes/v0.49.0.md b/release notes/v0.49.0.md index 684a21b33c6..4f1661d37be 100644 --- a/release notes/v0.49.0.md +++ b/release notes/v0.49.0.md @@ -10,7 +10,7 @@ k6 `v0.49.0` is here πŸŽ‰! This release includes: ## Breaking changes -- [#3494](https://github.com/grafana/k6/pull/3494) stops pushing `loadimpact/k6` docker image. If you still use it, please migrate to the [grafana/k6](https://hub.docker.com/r/grafana/k6) image. +- [#3494](https://github.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://github.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 From 694f0e324b6375902d4fe99a5660ad150c513779 Mon Sep 17 00:00:00 2001 From: oleiade Date: Thu, 25 Jan 2024 10:43:05 +0100 Subject: [PATCH 25/27] Add links to web-dashboard documentation --- release notes/v0.49.0.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/release notes/v0.49.0.md b/release notes/v0.49.0.md index 4f1661d37be..74b01f25333 100644 --- a/release notes/v0.49.0.md +++ b/release notes/v0.49.0.md @@ -1,6 +1,6 @@ k6 `v0.49.0` is here πŸŽ‰! This release includes: -- Add a built-in web dashboard that displays test results in real time. +- Add a built-in [web dashboard](https://grafana.com/docs/k6/latest/results-output/web-dashboard/) that displays test results in real time. - Add `clear` functionality to the browser module's `locator` classes. - Merge the gRPC experimental module back into the gRPC core module. - Add the ability to get the selection from an element in `k6/html`. @@ -17,7 +17,7 @@ k6 `v0.49.0` is here πŸŽ‰! This release includes: ### Web Dashboard -The new web dashboard brings real-time visualization to load testing. This feature allows users to monitor test progress and analyze +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 From 5617b7c3870e908407e94eb586ebd2dbecd0ecdd Mon Sep 17 00:00:00 2001 From: Mihail Stoykov <312246+mstoykov@users.noreply.github.com> Date: Thu, 25 Jan 2024 20:48:08 +0200 Subject: [PATCH 26/27] Update release notes/v0.49.0.md --- release notes/v0.49.0.md | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/release notes/v0.49.0.md b/release notes/v0.49.0.md index 74b01f25333..202d16bca13 100644 --- a/release notes/v0.49.0.md +++ b/release notes/v0.49.0.md @@ -197,7 +197,6 @@ The data can let us know what percentage of our users will benefit from the intr - [browser#1107](https://github.com/grafana/xk6-browser/pull/1107), [browser#1109](https://github.com/grafana/xk6-browser/pull/1109) refactor internals. -## _Optional_ Roadmap - -_Discussion of future plans_ +## Roadmap +As mentioned earlier, there's work in progress to make xk6-timers stable as part of the next release. You can find more information on issue [#3297](https://github.com/grafana/k6/issues/3297). From 89779915c127cc6b0c7446e8918a099ae230e15c Mon Sep 17 00:00:00 2001 From: Mihail Stoykov <312246+mstoykov@users.noreply.github.com> Date: Fri, 26 Jan 2024 16:16:16 +0200 Subject: [PATCH 27/27] Apply suggestions from code review Co-authored-by: Oleg Bespalov --- release notes/v0.49.0.md | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/release notes/v0.49.0.md b/release notes/v0.49.0.md index 202d16bca13..9618014465e 100644 --- a/release notes/v0.49.0.md +++ b/release notes/v0.49.0.md @@ -1,11 +1,11 @@ -k6 `v0.49.0` is here πŸŽ‰! This release includes: +k6 `v0.49.0` is here πŸŽ‰! This release: -- Add a built-in [web dashboard](https://grafana.com/docs/k6/latest/results-output/web-dashboard/) that displays test results in real time. -- Add `clear` functionality to the browser module's `locator` classes. -- Merge the gRPC experimental module back into the gRPC core module. -- Add the ability to get the selection from an element in `k6/html`. -- Collect internal modules and outputs used by a script. -- Get `k6/experimental/timers` ready to be stabilized. +- 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 @@ -34,7 +34,7 @@ Once enabled and the test script is running, navigate to [http://localhost:6565] #### Test report -The web dashboard also offers an [HTML test report](https://github.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 +The web dashboard also offers an HTML test report (see [an example](https://github.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. @@ -186,7 +186,7 @@ The data can let us know what percentage of our users will benefit from the intr - Lint fixes throughout the k6 code base [#3460](https://github.com/grafana/k6/pull/3460), [#3462](https://github.com/grafana/k6/pull/3462), [#3463](https://github.com/grafana/k6/pull/3463), [#3478](https://github.com/grafana/k6/pull/3478), [#3479](https://github.com/grafana/k6/pull/3479), [#3480](https://github.com/grafana/k6/pull/3480), [#3481](https://github.com/grafana/k6/pull/3481), [#3482](https://github.com/grafana/k6/pull/3482), [#3483](https://github.com/grafana/k6/pull/3483), [#3484](https://github.com/grafana/k6/pull/3484), [#3485](https://github.com/grafana/k6/pull/3485), [#3495](https://github.com/grafana/k6/pull/3495). - [#3473](https://github.com/grafana/k6/pull/3473) refinements to the release process. - Dependency updates across k6 [#3500](https://github.com/grafana/k6/pull/3500), [#3501](https://github.com/grafana/k6/pull/3501), [#3502](https://github.com/grafana/k6/pull/3502), [#3503](https://github.com/grafana/k6/pull/3503), [#3509](https://github.com/grafana/k6/pull/3509), [#3513](https://github.com/grafana/k6/pull/3513), [#3537](https://github.com/grafana/k6/pull/3537), [#3539](https://github.com/grafana/k6/pull/3539), [#3540](https://github.com/grafana/k6/pull/3540). -- [#3489](https://github.com/grafana/k6/pull/3489) assign pull-requests via CODEOWNERS instead of with a specific GitHub Action. +- [#3489](https://github.com/grafana/k6/pull/3489) migrates pull-requests assignment to `CODEOWNERS` from GitHub Action. - [#3496](https://github.com/grafana/k6/pull/3496) checks for security issues with a scheduled trivy scan. - [#3517](https://github.com/grafana/k6/pull/3517) adds unit tests to the cloadapi package. This is the first contribution by external contributor @nilskch. Thanks for this @nilskch :bow:. - [#3520](https://github.com/grafana/k6/pull/3520) stops using deprecated by golang net.Dialer.DualStack option.