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

Use Chrome for testing #369

Merged
merged 4 commits into from
Nov 23, 2023
Merged

Use Chrome for testing #369

merged 4 commits into from
Nov 23, 2023

Conversation

alextu
Copy link
Contributor

@alextu alextu commented Nov 21, 2023

  • Configure the Chrome driver to use the Chrome for testing binary.
  • Also do not run acceptance tests on jenkins.io where neither firefox, chrome, firefox-container and chrome-container are currently working for us.
    In particular because of ATH doesn't work on recent Firefox acceptance-test-harness#1170 on firefox-container, but we still have failing acceptance tests on jenkins.io with chrome-container, that do not happen locally or on other infra.

Testing done

Ran build on jenkins.io and internally.

Submitter checklist

Preview Give feedback

And do not run acceptance tests on jenkins.io where neither firefox, chrome, firefox-container and chrome-container are currently working for us.
@alextu alextu requested review from welandaz and c00ler November 21, 2023 16:15
Copy link

@zielezin zielezin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM.

I have no experience with running this setup so I assume you have tested this ;)


private WebDriver createChromeWebDriver() {
ChromeOptions chromeOptions = new ChromeOptions();
chromeOptions.setBinary("/usr/bin/google-chrome-for-testing");

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Using /usr/bin/google-chrome-for-testing would point you to the latest version and as soon as we would update this would conflict with your chromedriver version.

I would change this to: /opt/google/119.0.6045.105/chrome-linux64/chrome

zielezin@dev34:~$ /opt/google/119.0.6045.105/chrome-linux64/chrome --version
Google Chrome for Testing 119.0.6045.105

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So actually, after investigating, it turned out we can delegate all the driver plumbing to Selenium. It will try to find the specified Chrome version installed and if not found, download it. So my latest commit specifies the version to stable which should afaik try to find a stable Chrome installed, and if not present will download the latest stable.

@@ -5,7 +5,6 @@ import java.net.URL

plugins {
java
id("buildlogic.chromedriver")

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As Selenium does this I think this plugin can be deleted too.,

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@alextu alextu merged commit da57983 into master Nov 23, 2023
11 checks passed
@alextu alextu deleted the atual/try-chrome-for-testing branch November 23, 2023 08:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants