|
| 1 | +xk6-browser v0.6.0 is here! :tada: |
| 2 | + |
| 3 | +This minor release contains essential stability fixes, bug fixes that we found while stress testing the application, improvements, and a continuation of our efforts to migrate to async APIs. |
| 4 | + |
| 5 | + |
| 6 | +## Bugs fixed |
| 7 | + |
| 8 | +- Fixed `ignoreDefaultArgs`. ([#547](https://github.com/grafana/xk6-browser/pull/547)) |
| 9 | + |
| 10 | + We're now not hiding scrollbars while running in headless mode. This issue was [causing](https://github.com/grafana/xk6-browser/issues/536) the browser viewport width to be larger than it should be. |
| 11 | + |
| 12 | +- Fixed data race while logging. ([#531](https://github.com/grafana/xk6-browser/pull/531)) |
| 13 | + |
| 14 | +- Fixed sending metrics with incorrect timestamp to the Cloud. ([#551](https://github.com/grafana/xk6-browser/pull/551)) |
| 15 | + |
| 16 | + The issue was preventing users from analyzing performance metrics in the Cloud. |
| 17 | + |
| 18 | +- Fixed the `waitUntil` option for `Page.goto`, `Page.reload` and `Page.waitForLoadState`. ([#578](https://github.com/grafana/xk6-browser/pull/578), [#623](https://github.com/grafana/xk6-browser/pull/623), [#628](https://github.com/grafana/xk6-browser/pull/628)) |
| 19 | + |
| 20 | + This now works as expected with the `load`, `domcontentloaded` and `networkidle` lifecycle events. `networkidle` might not work so well with websites that are very chatty and so the wait eventually could timeout. |
| 21 | + |
| 22 | +- Fixed a possible deadlock that can happen while navigating frames. ([#539](https://github.com/grafana/xk6-browser/pull/539)) |
| 23 | + |
| 24 | +- Fixed two possible data races which could occur during a navigation. ([#630](https://github.com/grafana/xk6-browser/pull/630)) |
| 25 | + |
| 26 | +## Breaking changes |
| 27 | + |
| 28 | +- `Page.goto` is now an asynchronous method that returns a `Promise`. ([#583](https://github.com/grafana/xk6-browser/pull/583), [#591](https://github.com/grafana/xk6-browser/pull/591)) |
| 29 | + |
| 30 | + All our examples have been updated to work with async `Page.goto`. For example, you can look at the [`browser_args.js` example](https://github.com/grafana/xk6-browser/blob/v0.6.0/examples/browser_args.js) for how to use it. |
| 31 | + |
| 32 | + Note that the `async` and `await` keywords are not yet supported (see [this k6 issue](https://github.com/grafana/k6/issues/779) for a workaround), so resolving the `Promise` using `then()` is required for scripts to continue to work correctly. |
| 33 | + |
| 34 | +- Setting a browser launch property to `null` will be ignored and the default will be used; take a look at the [BrowserType.launch](https://k6.io/docs/javascript-api/xk6-browser/browsertype/launch/) documentation for the defaults. ([#616](https://github.com/grafana/xk6-browser/pull/616), [#620](https://github.com/grafana/xk6-browser/pull/620)) |
| 35 | + |
| 36 | + For example: |
| 37 | + ```js |
| 38 | + const browser = chromium.launch({ |
| 39 | + headless: null, // will be set to true |
| 40 | + logCategoryFilter: null, // will be set to '.*' |
| 41 | + timeout: null, // will be set to 30s |
| 42 | + }); |
| 43 | + ``` |
| 44 | +- Setting some browser launch options will be ignored on Cloud. ([#627](https://github.com/grafana/xk6-browser/pull/627)) |
| 45 | + |
| 46 | + Setting the following options will be ignored, and they take their default values as follows: |
| 47 | + |
| 48 | + option | default | note |
| 49 | + ------ | ------- | ----- |
| 50 | + devtools | false |
| 51 | + executablePath | "" | will be determined by xk6-browser |
| 52 | + headless | true | |
| 53 | + |
| 54 | +## Improvements |
| 55 | + |
| 56 | +- Added an example of how to use `xk6-browser` alongside `k6`. ([#529](https://github.com/grafana/xk6-browser/pull/529)) |
| 57 | + |
| 58 | +- Improved handling of browser process exit and WS connection closing. ([#535](https://github.com/grafana/xk6-browser/pull/535)) |
| 59 | + |
| 60 | + We're now waiting for the browser process to exit before ending the iteration. Previously, we would cancel the browser context prematurely, which caused the _process unexpectedly ended_ and _signal: killed_ errors. |
| 61 | + |
| 62 | +- Improved the internal event handling mechanism. ([#555](https://github.com/grafana/xk6-browser/pull/555)) |
| 63 | + |
| 64 | + Now we're handling events in the order we receive them. This change has drastically improved the extension's stability. |
| 65 | + |
| 66 | +- Improved emitting errors from the browser. ([#598](https://github.com/grafana/xk6-browser/pull/598)) |
| 67 | + |
| 68 | + Now we're returning the error that can occur while launching a browser. Previously, we would log a _file already closed error_ if the browser process exits prematurely. |
| 69 | + |
| 70 | +- Added a Docker example. ([#556](https://github.com/grafana/xk6-browser/pull/556), [#631](https://github.com/grafana/xk6-browser/pull/631)) |
| 71 | + |
| 72 | + You can now use xk6-browser [using Docker](https://github.com/grafana/xk6-browser#running-examples-in-a-docker-container). For example: |
| 73 | + |
| 74 | + ```bash |
| 75 | + docker-compose run -T xk6-browser run - <examples/browser_on.js |
| 76 | + ``` |
| 77 | + |
| 78 | +- Upgraded the project to be compatible with Go 1.19. ([#568](https://github.com/grafana/xk6-browser/pull/568)) |
| 79 | + |
| 80 | +- Added a troubleshooting document. ([#569](https://github.com/grafana/xk6-browser/pull/569)) |
| 81 | + |
| 82 | + This document is a good place to start when you have issues installing or running xk6-browser. |
| 83 | + |
| 84 | +- Added a GitHub issues template. ([#584](https://github.com/grafana/xk6-browser/pull/584)) |
| 85 | + |
| 86 | + It makes it easier for you to send us the details of the problems you're facing. |
| 87 | + |
| 88 | +- Return an error on invalid `BrowserType.launch` options. ([#608](https://github.com/grafana/xk6-browser/pull/608)) |
| 89 | + |
| 90 | +- Fixed the example test script `browser_args.js` on macOS. ([#629](https://github.com/grafana/xk6-browser/pull/629)) |
| 91 | + |
| 92 | + |
| 93 | +## Internals |
| 94 | + |
| 95 | +- Upgraded `k6` dependency to `v0.41.0`. ([#633](https://github.com/grafana/xk6-browser/pull/633)) |
| 96 | + |
| 97 | +- Several refactors and bug fixes to improve maintainability and stability. |
| 98 | + ([#525](https://github.com/grafana/xk6-browser/pull/525), [#526](https://github.com/grafana/xk6-browser/pull/526), [#532](https://github.com/grafana/xk6-browser/pull/532), [#534](https://github.com/grafana/xk6-browser/pull/534), [#540](https://github.com/grafana/xk6-browser/pull/540), [#541](https://github.com/grafana/xk6-browser/pull/541), [#510](https://github.com/grafana/xk6-browser/issues/510), [#548](https://github.com/grafana/xk6-browser/pull/548), [#564](https://github.com/grafana/xk6-browser/pull/564), [#565](https://github.com/grafana/xk6-browser/pull/565), [#570](https://github.com/grafana/xk6-browser/pull/570), [#572](https://github.com/grafana/xk6-browser/pull/572), [#574](https://github.com/grafana/xk6-browser/pull/574), [#576](https://github.com/grafana/xk6-browser/pull/576), [#581](https://github.com/grafana/xk6-browser/pull/581), [#585](https://github.com/grafana/xk6-browser/pull/585), [#586](https://github.com/grafana/xk6-browser/pull/586), [#587](https://github.com/grafana/xk6-browser/pull/587), [#588](https://github.com/grafana/xk6-browser/pull/588), [#589](https://github.com/grafana/xk6-browser/pull/589), [#595](https://github.com/grafana/xk6-browser/pull/595), [#596](https://github.com/grafana/xk6-browser/pull/596), [#599](https://github.com/grafana/xk6-browser/pull/599), [#604](https://github.com/grafana/xk6-browser/pull/604), [#606](https://github.com/grafana/xk6-browser/pull/606), [#607](https://github.com/grafana/xk6-browser/pull/607), [#615](https://github.com/grafana/xk6-browser/pull/615), [#617](https://github.com/grafana/xk6-browser/pull/617), [#634](https://github.com/grafana/xk6-browser/pull/634), [#636](https://github.com/grafana/xk6-browser/pull/636)) |
| 99 | + |
0 commit comments