Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

test: add Chrome for Testing example #1270

Open
wants to merge 6 commits into
base: master
Choose a base branch
from

Conversation

MikeMcC399
Copy link
Collaborator

@MikeMcC399 MikeMcC399 commented Dec 29, 2024

Issue

Google Chrome for Testing is not part of the factory build process and it is not yet documented how to include it in a custom-built Cypress Docker image. Cypress 13.17.0, released Dec 17, 2024, and above, support this browser.

The Google Chrome browser (not Google Chrome for Testing) is currently packaged into Cypress Docker Linux/amd64 images in the repositories cypress/browsers and cypress/included.

Note that neither "Chrome" nor "Chrome for Testing" are currently available for the Linux/arm64 platform.

Benefits

Adding an example for Chrome for Testing, benefits Cypress Docker users who want to test against Chrome for Testing inside Docker. The Blog announcement for Chrome for Testing cites the lack of auto update and ability to install a specific version as the main advantages of Chrome for Testing.

@puppeteer/browsers, with its download option for Chrome for Testing, conveniently allows version selection:

  • by explicit full version e.g. 131.0.6778.204
  • by major version e.g. 131
  • by channel alias:
    • stable
    • beta
    • dev
    • canary

The flexible version selection is an advantage compared to the Cypress Docker factory process which allows only a full version specification to select a Chrome version. No selection using major version or channel alias is allowed in the Cypress Docker factory process.

Change

  • Add a sub-directory chrome-for-testing to the examples directory.
  • Provide a working example of installing the Chrome for Testing browser in a Cypress Docker image and running it with Cypress.

References

Google Chrome for Testing:

Installation using

Verification

Ubuntu 24.04.1 LTS, Node.js 22.12.0 LTS, Docker Desktop 4.37.1

git clone https://github.com/cypress-io/cypress-docker-images
cd cypress-docker-images
cd examples/chrome-for-testing
./scripts/test.sh

Also verified in actions/workflows/example-tests.yml.

@MikeMcC399 MikeMcC399 added type: enhancement example 💎 Need to create a good example labels Dec 29, 2024
@cypress-app-bot
Copy link

@MikeMcC399 MikeMcC399 self-assigned this Dec 29, 2024
@MikeMcC399 MikeMcC399 force-pushed the add/chrome-for-testing branch from f048452 to 3933a4d Compare December 29, 2024 17:41
@MikeMcC399 MikeMcC399 marked this pull request as ready for review December 29, 2024 18:11
@MikeMcC399 MikeMcC399 marked this pull request as draft January 2, 2025 14:57
@jennifer-shehane
Copy link
Member

@jennifer-shehane Is there a reason this is in draft?

@MikeMcC399 MikeMcC399 force-pushed the add/chrome-for-testing branch from e67784d to b1856b2 Compare January 2, 2025 16:28
@MikeMcC399

This comment was marked as resolved.

@MikeMcC399 MikeMcC399 marked this pull request as ready for review January 2, 2025 16:41
@MikeMcC399
Copy link
Collaborator Author

MikeMcC399 commented Jan 8, 2025

CI has failed due to transient network errors, such as the inability to reach https://on.cypress.io/wait

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
example 💎 Need to create a good example type: enhancement
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants