Automation Testing

Chrome for Testing: A Game-Changer for Web App Testing and Automation

By Test Guild
  • Share:
Join the Guild for FREE

In the ever-evolving world of web development, testing, and automation are crucial components of creating a high-quality web experience.

However, setting up an adequate browser testing environment can be notoriously tricky.

This is where Google's new offering, Chrome for Testing, comes into play.

Automation engineers rejoice!

This new Chrome flavor is specifically designed for web app testing and automation use cases, providing a solution to developers' /SDET‘s many pain points in their testing processes.

I covered this in my weekly news show but got so much response that I created a blog post.

The Problem with Auto-Update

One of Chrome's most notable features is its ability to auto-update.

While this is great for users who want to ensure they're running an up-to-date and secure browser version, it can be a nightmare for developers running end-to-end tests. The auto-update feature can lead to inconsistencies in test results if the browser executable or binary decides to update itself between two runs.

Developers often want to pin a specific browser version and check that version number into their source code repository, which is impossible with an auto-updating browser binary.

This is a fundamental mismatch between what's good for regular browser users and what's good for automated testing developers.

The Difficulty of Versioned Browser Binaries

Google intentionally doesn't make versioned Chrome downloads available, as users should always get updated to the latest version as soon as possible. However, this is problematic for developers needing to reproduce a bug report in an older Chrome version.

A specific example of this problem is when developers want to use ChromeDriver for browser automation.

They must download a Chrome binary and a correspondingly-versioned ChromeDriver binary to ensure the two binaries are compatible.

The Solution: Chrome for Testing

Chrome for testing is designed to solve these problems. It is a dedicated flavor of Chrome targeting the testing use case, without auto-update, integrated into the Chrome release process, and made available for every Chrome release. It's a versioned binary as close to regular Chrome as possible without negatively affecting the testing use case.

To create Chrome for Testing, changes have been made to the Chromium and Chrome codebases, and infrastructure has been set up to build and upload these binaries to a publicly available bucket in lockstep with the Chrome release process across all channels (Stable, Beta, Dev, and Canary).

Chrome for Testing Browser

How to Get Chrome for Testing Binaries

The easiest way to download Chrome for Testing binaries for your platform is by using the @puppeteer/browsers command-line utility, available via npm. If you prefer to build automated scripts for downloading these binaries, Google offers JSON API endpoints with the latest versions per Chrome release channel (Stable, Beta, Dev, Canary).

Or just go to https://googlechromelabs.github.io/chrome-for-testing/ and download the right version for your environment.

Chrome Testing Awesomeness

Chrome for testing is a significant step in addressing developers' challenges when setting up browser testing environments.

By providing a versioned, non-auto-updating Chrome binary specifically designed for Testing, Google has made it easier for developers to achieve consistent, reproducible results in their testing processes.

Chrome for Testing is unsuitable for daily browsing but is a game-changer for web app testing and automation.

So, if you're a developer looking to streamline your testing process, Chrome for Testing might just be the solution you've been waiting for.

{"email":"Email address invalid","url":"Website address invalid","required":"Required field missing"}

What is Synthetic Monitoring? (2024 Guide)

Posted on 04/18/2024

I've found over the years many testers are unsure about what is synthetic ...

SafeTest: Next Generation Testing Framework from Netflix

Posted on 03/26/2024

When you think of Netflix the last thing you probably think about is ...

Top Free Automation Tools for Testing Desktop Applications (2024)

Posted on 03/24/2024

While many testers only focus on browser automation there is still a need ...