Skip to content

The browser module adds support for browser automation and end-to-end web testing via the Chrome Devtools Protocol to k6.

License

Notifications You must be signed in to change notification settings

grafana/xk6-browser

This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Folders and files

NameName
Last commit message
Last commit date

Latest commit

b948275 · Nov 26, 2024
Oct 3, 2024
Dec 14, 2021
Nov 26, 2024
Sep 25, 2024
Nov 25, 2024
Mar 4, 2024
Nov 13, 2024
Mar 6, 2023
Oct 25, 2024
Oct 4, 2024
Feb 14, 2024
Oct 6, 2022
Feb 10, 2023
Sep 11, 2024
Sep 4, 2024
Nov 26, 2024
Jan 9, 2024
Dec 9, 2021
Feb 14, 2024
Nov 7, 2024
Jul 29, 2022
Feb 6, 2023
Jun 2, 2023
Mar 7, 2021
Feb 6, 2023
Nov 7, 2024
Dec 7, 2023
Aug 29, 2022
Oct 6, 2022
Sep 30, 2022
Nov 18, 2024
Nov 18, 2024
Jun 7, 2024
Jun 7, 2024

Repository files navigation

Browser automation and end-to-end web testing for k6

A module for k6 adding browser-level APIs with rough Playwright compatibility.

Github release Build status Go Report Card
@k6_io on Twitter

Download · Documentation · Community Forum · Public Roadmap ·


---


k6-browser is a k6 module that supports browser automation through the Chrome Devtools Protocol (CDP). It adds browser-level APIs to interact with browsers and collect frontend performance metrics as part of your k6 tests.

As of k6 version 0.52.0, k6-browser is now bundled in k6 as a core module and usable without a separate binary or compilation step!

Special acknowledgment to the authors of Playwright and Puppeteer for their trailblazing work in this area.

Goals

  • Bring browser automation to the k6 testing platform while supporting core k6 features like VU executors, scenarios, metrics, checks, thresholds, logging, DNS remapping, IP blocklists, etc.
  • Test stability as the top priority by supporting non-flaky selectors combined with auto-waiting for actions just like Playwright.
  • Aim for rough API compatibility with Playwright. The reason for this is twofold: first, we don't want users to have to learn a completely new API just to use xk6-browser, and second, it opens up the possibility of using the Playwright RPC server as an optional backend for the k6 browser module should we decide to support that in the future.
  • Support for Chromium-compatible browsers first, and eventually Firefox and WebKit-based browsers.

Please take a look at our project roadmap for more details.

Get started

Documentation

Get help

  • If you're having issues installing or running xk6-browser, refer to TROUBLESHOOTING.
  • To get help with usage, report bugs, suggest features, and discuss xk6-browser with other users, see SUPPORT.md.
  • Community discussion happens at the xk6-browser forum.

Additional resources

To find out more about xk6-browser or browser testing in general, check out the following links.

Note: Since our API is still transitioning, some of the code snippets from the links below might be inaccurate, though the concepts should still be correct. For the latest, please take a look at our up-to-date API documentation.