github grafana/xk6-browser v0.6.0

latest releases: v1.8.2, v1.8.1, v1.8.0...
22 months ago

xk6-browser v0.6.0 is here! 🎉

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.

Bugs fixed

  • Fixed ignoreDefaultArgs. (#547)

    We're now not hiding scrollbars while running in headless mode. This issue was causing the browser viewport width to be larger than it should be.

  • Fixed data race while logging. (#531)

  • Fixed sending metrics with incorrect timestamp to the Cloud. (#551)

    The issue was preventing users from analyzing performance metrics in the Cloud.

  • Fixed the waitUntil option for Page.goto, Page.reload and Page.waitForLoadState. (#578, #623, #628)

    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.

  • Fixed a possible deadlock that can happen while navigating frames. (#539)

  • Fixed two possible data races which could occur during a navigation. (#630)

Breaking changes

  • Page.goto is now an asynchronous method that returns a Promise. (#583, #591)

    All our examples have been updated to work with async Page.goto. For example, you can look at the browser_args.js example for how to use it.

    Note that the async and await keywords are not yet supported (see this k6 issue for a workaround), so resolving the Promise using then() is required for scripts to continue to work correctly.

  • Setting a browser launch property to null will be ignored and the default will be used; take a look at the BrowserType.launch documentation for the defaults. (#616, #620)

    For example:

    const browser = chromium.launch({
      headless: null,          // will be set to true
      logCategoryFilter: null, // will be set to '.*'
      timeout: null,           // will be set to 30s
    });
  • Setting some browser launch options will be ignored on Cloud. (#627)

    Setting the following options will be ignored, and they take their default values as follows:

    option default note
    devtools false
    executablePath "" will be determined by xk6-browser
    headless true

Improvements

  • Added an example of how to use xk6-browser alongside k6. (#529)

  • Improved handling of browser process exit and WS connection closing. (#535)

    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.

  • Improved the internal event handling mechanism. (#555)

    Now we're handling events in the order we receive them. This change has drastically improved the extension's stability.

  • Improved emitting errors from the browser. (#598)

    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.

  • Added a Docker example. (#556, #631)

    You can now use xk6-browser using Docker. For example:

    docker-compose run -T xk6-browser run - <examples/browser_on.js
  • Upgraded the project to be compatible with Go 1.19. (#568)

  • Added a troubleshooting document. (#569)

    This document is a good place to start when you have issues installing or running xk6-browser.

  • Added a GitHub issues template. (#584)

    It makes it easier for you to send us the details of the problems you're facing.

  • Return an error on invalid BrowserType.launch options. (#608)

  • Fixed the example test script browser_args.js on macOS. (#629)

Internals

Don't miss a new xk6-browser release

NewReleases is sending notifications on new releases.