-
Notifications
You must be signed in to change notification settings - Fork 3.7k
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
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Looks like stable is grabbing an old version of Chrome for some reason. tests are timing out because it's older than Chrome 69 |
Could also be an issue with dpkg https://askubuntu.com/questions/1065231/dpkg-deb-error-archive-has-premature-member-control-tar-xz-before-contr/1100361 |
This looks like the issue: travis-ci/travis-ci#9361 |
Should we just switch distro until the issue is fixed? |
RoboErikG
approved these changes
Sep 11, 2019
samelhusseini
changed the title
Attempt to fix travis
Fix travis by running browser tests in headless mode
Sep 12, 2019
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
The basics
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 toolselenium-standalone
. This makes configuration of selenium and driver versions cleaner and in the one filetests/scripts/selenium-config.js
.Reason for Changes
Fix travis