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

Update e2e test dependency updates & get them running on Mac #2083

Conversation

benjaminapetersen
Copy link
Contributor

@benjaminapetersen benjaminapetersen commented Sep 15, 2017

https://trello.com/c/w3vdwj85

fix #2200

Based off of #2068, though not really dependent. Related to #1473, a previous attempt at getting our e2e tests running.

Depends on #2268 for junit additions.

NOTE: this PR currently contains a backup of node_modules/protractor in test/package_backups/protractor, which accounts for many of the listed files changed (166!)

TODO:

  • Update dependencies
  • Update .conf.js files
  • Eliminate special Mac conf if possible
  • Create helpers for testing non-angular pages (login page) - helpers/nonAngular.js
  • Get e2e tests running locally in Chrome
  • Get e2e tests running locally in Firefox
  • Get e2e tests running in PhantomJS or Nightmare
  • Get e2e tests running in CI in headless Chrome
  • Fix tests broken since updates

ISSUES:

  • Accepting certs does not work in Firefox (now using chrome)
  • Need to run grunt serve once in order to accept certs (not with chrome)
  • Webdriver manager is a huge hassle due to a dependence on Github's API, which is aggressively rate-limited when non-authenticated. It attempts to use the API to detect a good Selenium server to download. npm install works fine outside of the office, but in office the rate-limit is always exceeded (IP address specific I suppose). This is a known issue, links in comments below. (appears to have resolved on its own, unfortunately I think these dependencies can change under us)

Firefox ESR download links for testing locally (match jenkins):

For reference, Downgrade of FF in Jenkins PR
For reference, jenkins config file

@spadgett

@spadgett
Copy link
Member

@benjaminapetersen 👍 nice work

@benjaminapetersen
Copy link
Contributor Author

@stevekuznetsov I may request some assistance from you here as well soon. Working on the other PR I pinged you on first as unit tests should be easier than e2e to get up and running again...

@openshift-bot openshift-bot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Sep 16, 2017
@benjaminapetersen benjaminapetersen force-pushed the bpetersen/e2e-test-dependency-updates branch from 43e9fd2 to e553d83 Compare September 18, 2017 03:32
@openshift-bot openshift-bot removed the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Sep 18, 2017
@benjaminapetersen
Copy link
Contributor Author

Been working on getting some progress with webdriver-manager hitting rate limit issues with github & not being able to update.

angular/webdriver-manager#270
angular/webdriver-manager#269

I don't see much activity in webdriver-manager since May, not sure if that bodes well.

@benjaminapetersen benjaminapetersen force-pushed the bpetersen/e2e-test-dependency-updates branch from e553d83 to 41ffaeb Compare September 19, 2017 14:16
@openshift-bot openshift-bot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Sep 23, 2017
@benjaminapetersen benjaminapetersen force-pushed the bpetersen/e2e-test-dependency-updates branch 2 times, most recently from e61b45f to 2897413 Compare September 29, 2017 19:39
@openshift-bot openshift-bot removed the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Sep 29, 2017
@benjaminapetersen
Copy link
Contributor Author

[test]

1 similar comment
@benjaminapetersen
Copy link
Contributor Author

[test]

@benjaminapetersen
Copy link
Contributor Author

benjaminapetersen commented Oct 3, 2017

Sigh. Welp, twas' working a week ago. Wheee!

Tempted to suggest converting e2e tests to unit tests & dropping the whole e2e flow entirely....

@benjaminapetersen
Copy link
Contributor Author

benjaminapetersen commented Oct 3, 2017

Issue in protractor tracking one of our problems. Our chrome-driver dependency is not latest, so we are getting a bug (see the convo), however, karma-chrome-launcher is latest, so I'm not exactly sure how to nail down all the dependencies down the tree that keep giving us headaches.

second issue where protractor is incorrectly seeing both capabilities & multiCapabilities.

@benjaminapetersen
Copy link
Contributor Author

issue in webdriver manager tracking one of our problems.
another issue in webdriver manager tracking one of our problems.

@benjaminapetersen
Copy link
Contributor Author

[test] plz

@benjaminapetersen
Copy link
Contributor Author

Issues:

visiting url: create-project
[20:37:02] E/protractor - Could not find Angular on page https://localhost:9000/dev-console/create-project : retries looking for angular exceeded
Fskipping window.setSize()...
visiting url: create-project
[20:37:13] E/protractor - Could not find Angular on page https://localhost:9000/dev-console/create-project : retries looking for angular exceeded
Fskipping window.setSize()...
visiting url: create-project
[20:37:23] E/protractor - Could not find Angular on page https://localhost:9000/dev-console/create-project : retries looking for angular exceeded
FF
...
   Failed: Angular could not be found on the page https://localhost:9000/dev-console/create-project.If this is not an Angular application, you may need to turn off waiting for Angular.
                              Please see 
                              https://github.com/angular/protractor/blob/master/docs/timeouts.md#waiting-for-angular-on-page-load
  Stack:
    Error: Angular could not be found on the page https://localhost:9000/dev-console/create-project.If this is not an Angular application, you may need to turn off waiting for Angular.
...

🙁

@benjaminapetersen
Copy link
Contributor Author

lolz... welp, runs locally, won't run in travis. flipped the problem around now. 🙄

@benjaminapetersen
Copy link
Contributor Author

[test]

1 similar comment
@benjaminapetersen
Copy link
Contributor Author

[test]

@spadgett
Copy link
Member

spadgett commented Oct 4, 2017

@benjaminapetersen I think you need to get screenshots working again to be able to debug in Jenkins.

@spadgett
Copy link
Member

spadgett commented Oct 4, 2017

[test]

1 similar comment
@benjaminapetersen
Copy link
Contributor Author

[test]

@benjaminapetersen
Copy link
Contributor Author

yay screenshots

@benjaminapetersen
Copy link
Contributor Author

/retest

@benjaminapetersen
Copy link
Contributor Author

benjaminapetersen commented Oct 18, 2017

Attempting to work out the flakes running the tests in CI. Opened an issue with Hawtio as the manual bootstrapping (on the document) may be causing some of the issue:

Hawtio 2398 and manual bootstrap instructions.

Also, angular.bootstrap function docs page states:

Note: Protractor based end-to-end tests cannot use this function to bootstrap manually. They must use ngApp.

@benjaminapetersen
Copy link
Contributor Author

/test

@dtaylor113
Copy link
Contributor

Hi, just cloned this PR branch and after upgrading my Chrome browser (linux/Fedora v62), e2e tests passed.

@benjaminapetersen
Copy link
Contributor Author

Great, thanks @dtaylor113.

So far then, @benjaminapetersen, @dtaylor113 & @rhamilto have run successfully, but @spadgett has not been able to get them to run. CI is currently flaky, but I'm pretty sure I know why & will try to address that today if possible.

@benjaminapetersen
Copy link
Contributor Author

/test

@benjaminapetersen
Copy link
Contributor Author

Jenkins / Travis success.

/test again (going for 3x)

@benjaminapetersen
Copy link
Contributor Author

@stevekuznetsov 😠 😡 😠 😡
Just cuz I'm sure you want to know about all my rage faces.

@benjaminapetersen
Copy link
Contributor Author

/retest

- Upgrade protractor & dependencies
- Rewrite tests to match new APIs
- Remove deprecated tests
- Remove protractor-mac.conf.js & use a single protractor config
- Add `user logs in` spec to work out bugs with the login flow.
- Fix login flow (non-angular page), update some helpers to new protractor apis, fixing individual tests in progress
- Add temp e2e grunt task to make testing quicker
- Add additional scrollTo window helpers
- Update createFromTemplate page to eliminate test flakes due to protractor changes
- Add nextSteps page pageObject
- Remove chrome from multiCapabilities in protractor.conf so grunt can handle setting the browser
- Update framework from jasmine to jasmine2 in protractor.conf.js
- Deduplicate common setup across test suites
- Add implicit browser.wait(1000) every time new PageObject() or PageObject.visit() to ensure items are properly rendered before tests continue
- Update support for screenshots.  Screenshots will be saved in /test/tmp/<browser>/<spec_title>.png
  - Screenshots taken for failed tests only
- Add new user_creates_project e2e test that exercises our menus (rather than browser page refreshes)
- Always default protractor to run with Chrome
- Standardize timing across modules
- Improve reporting output of protractor tests
- Use color output locally on mac for test output, plain text in Jenkins
	- Jenkins does not do well with the escape codes
  - Prow (Jenkins) should now use the JUnit xml files to give us better context on failure anyway
@benjaminapetersen benjaminapetersen force-pushed the bpetersen/e2e-test-dependency-updates branch from 8d81f24 to 75fd47b Compare December 20, 2017 17:09
@benjaminapetersen
Copy link
Contributor Author

benjaminapetersen commented Dec 20, 2017

rebased, happily was not painful.

@openshift-ci-robot
Copy link

@benjaminapetersen: The following test failed, say /retest to rerun them all:

Test name Commit Details Rerun command
ci/openshift-jenkins 16dc281 link /test

Full PR test history. Your PR dashboard. Please help us cut down on flakes by linking to an open issue when you hit one in your PR.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. I understand the commands that are listed here.

@openshift-merge-robot
Copy link
Contributor

@benjaminapetersen PR needs rebase

@openshift-merge-robot openshift-merge-robot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Jan 26, 2018
@benjaminapetersen
Copy link
Contributor Author

Revisited this, and got over the Hawtio hump (I think) but we will now hit this:

Error: Cannot find module '_debugger'
    at Function.Module._resolveFilename (module.js:555:15)
    at Function.Module._load (module.js:482:25)
    at Module.require (module.js:604:17)
    at require (internal/module.js:11:18)

angular/protractor#4307

Doesn't look like the protractor team is going to address that anytime soon. Its still usable, but its a node 8 bug thats been sitting for quite a while.

@spadgett
Copy link
Member

spadgett commented Feb 8, 2018

I think we'd see that node 8 error without these changes. That seems to just be a protractor problem.

@benjaminapetersen
Copy link
Contributor Author

Yup, its just general.... just a little concerned the protractor & webdriver-manager teams are not terribly responsive anymore.

@spadgett spadgett closed this Jan 24, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Test Flake: A Jasmine spec timed out. Resetting the WebDriver Control Flow.
8 participants