Skip to content
This repository has been archived by the owner on Aug 30, 2021. It is now read-only.

fix(build): E2E coverage broken on Travis CI #1805

Merged
merged 1 commit into from
Jul 1, 2017

Conversation

mleanos
Copy link
Member

@mleanos mleanos commented Jun 29, 2017

Fixes an issue with the Travis CI builds failing at the E2E tests due to
an apparent issue with the Mozilla Gecko web-driver used with Selenium.

  1. Upgrades gulp-protractor to ensure Protractor v5> is used.
  2. Removes --firefox option from the Travis CI Selenium
    webdriver-manager update step.
  3. Changes Protractor config to use Chrome instead of Firefox.

NOTE: This PR was originally created on a debugging branch to determine the issues with the E2E tests running on Travis CI builds. The below conversation will reflect the process of numerous experimental commits to track down the source of the issues. After a conclusion was made, the commits in this branch were squashed, and the commit details were changed here.

@mleanos
Copy link
Member Author

mleanos commented Jun 29, 2017

@lirantal @simison Any thoughts here?

Why are we using Firefox, rather than Chrome?

Switching to Chrome and updating gulp-protractor seemed to have fixed the E2E tests.

However, I have no idea what's going on with this (it only happens with the first job on each Node version) 😕

https://travis-ci.org/meanjs/mean/jobs/248564363#L516

Could this be an issue with Travis' "trusty" image?

@lirantal
Copy link
Member

I didn't setup the E2E initially so I don't know the historical versions of using firefox, maybe it was only available at that time on Travis CI.
Also good point on the trusty image since it's a change I did recently in attempt to speed up builds so maybe related and we can try to roll back that setting.

@simison
Copy link
Member

simison commented Jun 30, 2017

Perhaps something changed with on 21st? https://blog.travis-ci.com/2017-06-21-trusty-updates-2017-Q2-launch

@simison
Copy link
Member

simison commented Jun 30, 2017

I remember a few months ago someone tried a PR for Trustroots where they changed browser to Firefox (because no more PhantomJS). It threw some errors so I assume it had some similar issues.

Would be awesome to support Firefox but seems like not worth the effort right now.

@simison
Copy link
Member

simison commented Jun 30, 2017

@mleanos did you test this on Travis config?

addons:
  firefox: latest

@mleanos
Copy link
Member Author

mleanos commented Jun 30, 2017

No. I haven't. :) I've exhausted almost every other config/option that I could think of, or find on the webs. I'll try this now. Thanks :)

@mleanos
Copy link
Member Author

mleanos commented Jun 30, 2017

However, I have no idea what's going on with this (it only happens with the first job on each Node version) 😕

https://travis-ci.org/meanjs/mean/jobs/248564363#L516

Seems to have gone away.. again with the 😕 smh

@simison
Copy link
Member

simison commented Jun 30, 2017

@mleanos the problem wasn't neither one of these listed at trouble shooting, right?

https://docs.travis-ci.com/user/gui-and-headless-browsers/#Troubleshooting

I actually think we might've had that timeout issue at Trustroots.

@mleanos
Copy link
Member Author

mleanos commented Jun 30, 2017

This is the error that is getting thrown each time I try to use Firefox..
https://travis-ci.org/meanjs/mean/jobs/248961045#L2753

I tried both and neither worked (I saw that someone downgraded to FF 46 & it solved the issue an issue for them)..

addons:
  firefox: latest
addons:
  firefox: 46

The troubleshooting link you sent seems to apply to Karma, and not Protractor, since our client-side tests run fine, but the E2E is failing.

It's gotta be an issue with that Gecko driver, and I've tried setting a $PATH for it, as you can see with a couple of my commits.

@mleanos
Copy link
Member Author

mleanos commented Jun 30, 2017

Please bear in mind that I'm learning the nuances of Travis CI as I go :) So there just might be something that I'm overlooking. As it stands, it doesn't look feasible to use Firefox at the moment. Unless we can figure out that Gecko driver path issue. It's odd that it popped up recently.

The last thing I haven't tried is to remove the use of the "trusty" image.

@simison
Copy link
Member

simison commented Jun 30, 2017

I think comment here says it all:

The first overall goal of headless browsing is to make automated testing of Firefox less painful for developers.

https://bugzilla.mozilla.org/show_bug.cgi?id=1338004
:-D

Totally not worth the pain yet — hopefully this will be easier eventually.

@lirantal
Copy link
Member

Keep at it @mleanos!

@mleanos
Copy link
Member Author

mleanos commented Jun 30, 2017

Out of curiosity, what's the benefit of using Firefox over Chrome in this instance?

One thing that I've always felt, is that FF isn't tied to Angular, so it would probably be safe to say "if it works in FF, it will work in Chrome." - Is that the general sentiment?

@mleanos
Copy link
Member Author

mleanos commented Jun 30, 2017

Keep at it @mleanos!

I may have run out of options though. So in order to get out builds to pass, we may just have to go with Chrome for now.

Fixes an issue with the Travis CI builds failing at the E2E tests due to
an apparent issue with the Mozilla Gecko web-driver used with Selenium.

1) Upgrades `gulp-protractor` to ensure Protractor v5> is used.
2) Removes `--firefox` option from the Travis CI Selenium
`webdriver-manager update` step.
3) Changes Protractor config to use Chrome instead of Firefox.
@mleanos mleanos force-pushed the debug/travis-protractor-fails branch from 7cde6d9 to 66b7d46 Compare July 1, 2017 01:34
@mleanos mleanos changed the title [DO NOT MERGE]debug(build): Debug Travis Builds fix(build): E2E coverage broken on Travis CI Jul 1, 2017
@mleanos
Copy link
Member Author

mleanos commented Jul 1, 2017

@lirantal @simison I propose we merge these changes in so our builds start passing again. We can just go with Chrome for now, and keep an eye on the Firefox issue.

I squashed the original commits in this PR, and cleaned up the commit message.

@lirantal
Copy link
Member

lirantal commented Jul 1, 2017

I don't have a specific preference for FF really. I think maybe it was the only option available back then for Travis CI.

Great work!

@lirantal lirantal self-requested a review July 1, 2017 10:38
@lirantal lirantal merged commit e3df83e into meanjs:master Jul 1, 2017
@codydaig
Copy link
Member

codydaig commented Jul 1, 2017

LGTM!

GulajavaMinistudio added a commit to GulajavaMinistudio/mean that referenced this pull request Jul 1, 2017
Update upstream fix(build): E2E coverage broken on Travis CI (meanjs#1805)
@mleanos mleanos deleted the debug/travis-protractor-fails branch July 2, 2017 04:12
cicorias pushed a commit to JavaScriptExpert/mean that referenced this pull request Sep 12, 2017
Fixes an issue with the Travis CI builds failing at the E2E tests due to
an apparent issue with the Mozilla Gecko web-driver used with Selenium.

1) Upgrades `gulp-protractor` to ensure Protractor v5> is used.
2) Removes `--firefox` option from the Travis CI Selenium
`webdriver-manager update` step.
3) Changes Protractor config to use Chrome instead of Firefox.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants