-
Notifications
You must be signed in to change notification settings - Fork 3.2k
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
Install newest Chrome browser before running tests #6115
Conversation
Thanks for the contribution! Below are some guidelines Cypress uses when doing PR reviews.
PR Review ChecklistIf any of the following requirements can't be met, leave a comment in the review selecting 'Request changes', otherwise 'Approve'. User Experience
Functionality
Maintainability
Quality
Internal
|
I am not authorized to run the server-performance-tests and all server-e2e-tests-* on CircleCI. I cannot test these items on my end. Could someone from Cypress help out? driver-integration-tests-chrome installs and uses Chrome 79 successfully. |
Hm...Let me install the latest Chrome browser when it is needed. The installation should occur in the server-e2e-tests-chrome-* and the driver-integration-tests-chrome. I'm not 100% with the solution because Chrome is (re)installed in every server-e2e-tests-chrome-*. I cannot just cache the .deb file for the Chrome installer because the browser may have other dependencies in the future. "apt-install" is the sure way to install Chrome. In addition, the Chrome installer is fetched from an external server. We really need the connection between CircleCI and the location of the Chrome debian package and its dependencies' to work consistently. If there's a more efficient solution, please let me or the maintainers know! |
circle.yml
Outdated
@@ -66,6 +74,10 @@ commands: | |||
steps: | |||
- attach_workspace: | |||
at: ~/ | |||
- when: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I intended to have the newest Chrome not to be installed for the server-e2e-tests-electron-*. install-latest-chrome is still installed for the electron tests. :( I could add a boolean flag to dictate whether the browser is installed or not. Is there a better way?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I wonder if you could update the install-latest-chrome
command to exit if the supplied browser
is not chrome
, maybe something like:
if [[ << parameters.browser >> = 'chrome' ]]
then
echo 'Running Chrome tests, installing latest version...'
else
echo 'Running in << parameters.browser >>, not updating Chrome...'
exit 0
fi
circle.yml
Outdated
steps: | ||
- run: | ||
command: | | ||
apt update ; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
apt-get
is usually recommended for scripts, but this is probably fine too since we aren't depending on the output
circle.yml
Outdated
apt update ; | ||
apt install google-chrome-stable -y ; | ||
which google-chrome ; | ||
google-chrome --version |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
maybe add an echo 'Google Chrome version:'
above this to help break it out
I've addressed the issues and the suggestions above. The tests driver-integration-tests-chrome installs the newest stable Chrome successfully, but some tests failed (https://app.circleci.com/jobs/github/cypress-io/cypress/239271). Let me investigate if they're Chrome 79 specific. Those failures should not be related to this change in circleci.yml.
|
The test failure is from
I haven't been able to reproduce this error locally either by running the single test in isolation or all tests from the file. I've Chrome 79.0.3945.130 installed on my computer as well. I don't like intermittent test failures, but let me kick off the tests again through rebasing. |
- Add a descriptive name to the install step, so the script doesn't get printed out twice - Let `browser` be any string - we have more browsers on the way 😄
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks!
Opened a new issue to revert / change implementation of this due to newly exhibited problems. #6328 Note: this implementation was effectively removed as part of https://github.com/cypress-io/cypress/pull/6293/files#diff-29944324a3cbf9f4bd0162dfe3975d88 in order to just get our changes in. |
I'm trying to investigate some Chrome 79+ related issues from #6023 by running the existing tests using the latest Chrome browser. We've been lagging in using the latest stable version of Chrome in testing Cypress itself.
I've some thoughts on how to use the latest stable version of Chrome in the testing. This work would enable the Cypress developers to address the compatibilities between Cypress and Chrome in a timely manner.
If it all goes well, we may close #5236. 👍
User facing changelog
Add the ability to test the changes against the latest stable version of the Google Chrome browser.
Additional details
The latest stable version of the Chrome is installed prior to running the test runs that uses Chrome. This way, we don't need to update the Docker image indicated in this line right away when a new version of Chrome becomes available.
cypress/circle.yml
Line 36 in 639ba32
Since this Docker image has the repository of Chrome configured, we can just run apt to retrieve the latest version of Chrome.
How has the user experience changed?
There should be no change in the user's experience. The developers can automatically run the tests against the latest stable version of Google Chrome instead of an older one.
PR Tasks
N/A