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

Fix travis by running browser tests in headless mode #3001

Merged
merged 34 commits into from
Sep 12, 2019
Merged

Conversation

samelhusseini
Copy link
Contributor

@samelhusseini samelhusseini commented Sep 11, 2019

The basics

  • I branched from develop
  • My pull request is against develop
  • My code follows the style guide

The details

Resolves

Fix travis

Proposed Changes

Here's a summary of what happened: (I think)

Travis was initially complaining about not being able to acquire google-chrome-stable from apt-get version 77. A public key not valid error. After some research we found this hinting to the issue being an issue with the dist we were using (trust). We switched to xenial, and that got us around that issue. We then found out that there was a mismatch between the chrome driver's supported version and the version we were acquiring.
apt-get google-chrome-stable was getting us a later version (73) than what the version of chrome-driver we were using (2.44).
After upgrading our chrome driver to 77.0.3865.40 which supports Chrome 77, we figured out that google-chrome-stable on the xenial dist was only getting us Chrome 73.
I then switched to acquiring chrome using the travis addon which got us version 77.

At this point we had compatible chrome driver + browser combination. We were still hitting an error DevToolsActivePort file doesn't exist.. Further detail on this issue here.
I still don't know why that issue is there, perhaps so far we've avoided this as we were using an old version of the driver, but we had to configure the browsers to run in headless mode on travis to workaround the issue.

I added a new env variable TRAVIS_CI, and used it to determine when to run the tests in headless mode. (so we can locally test them without them running in headless mode).

Updated selenium + driver acquisition:

We were acquiring selenium, chrome and gecko drivers manually using scripts under test/scripts. Instead we're able to use the CLI npm tool selenium-standalone. This makes configuration of selenium and driver versions cleaner and in the one file tests/scripts/selenium-config.js.

Reason for Changes

Fix travis

@RoboErikG
Copy link
Contributor

Looks like stable is grabbing an old version of Chrome for some reason. tests are timing out because it's older than Chrome 69

@RoboErikG
Copy link
Contributor

@RoboErikG
Copy link
Contributor

This looks like the issue: travis-ci/travis-ci#9361

@samelhusseini
Copy link
Contributor Author

Should we just switch distro until the issue is fixed?

@samelhusseini samelhusseini changed the title Attempt to fix travis Fix travis by running browser tests in headless mode Sep 12, 2019
@samelhusseini samelhusseini merged commit 09d2a16 into develop Sep 12, 2019
@samelhusseini samelhusseini deleted the travisfix branch September 12, 2019 00:25
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.

2 participants