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

Investigate using headless Chrome for testing Polymer 2 features #1276

Closed
Legioth opened this issue Feb 27, 2017 · 2 comments
Closed

Investigate using headless Chrome for testing Polymer 2 features #1276

Legioth opened this issue Feb 27, 2017 · 2 comments
Assignees
Milestone

Comments

@Legioth
Copy link
Member

Legioth commented Feb 27, 2017

Artur and/or Juhani might have some knowledge about using headless Chrome.

Alternatives:

  • Use a standalone Chrome or Firefox
  • Transpile Polymer 2 to ES5
@Legioth Legioth assigned Legioth and unassigned Legioth Feb 27, 2017
@Legioth Legioth added the ready label Feb 27, 2017
@Artur-
Copy link
Member

Artur- commented Feb 27, 2017

Gut feeling today would be that we should just set up xvfb + Chrome and run with that on Travis instead of PhantomJS.

https://bugs.chromium.org/p/chromium/issues/detail?id=604324 tracks "Selenium support for headless" but likely nothing will happen before https://bugs.chromium.org/p/chromium/issues/detail?id=612904 "Provide a runtime --headless mode for Chrome" lands. The second issue has not had activity this year

@denis-anisimov
Copy link
Contributor

So in the end I think Artur is right.

  • Headless Chrome can be used on Linux only (at the moment). I'm not even sure that it can be used at all since I don't have linux. There is a headless_shell which is available right now (not the same as headless chrome but rather some library which does some rendering). It also works on linux only. There is an experimental docker image available https://hub.docker.com/r/justinribeiro/chrome-headless/. I had no chance to check it since I'm not able even to install the docker locally. But it requires Chrome DevTools to communicate with and it's not clear how it's going to work with Selenium at all.
  • Transpilation looks too cumbersome. It's possible to transpile but it's not clear at which phase ? Most convenient way would be to transpile on the build phase (e.g. for tests only) and use e.g. maven plugin for that (with a lot of configuration) : http://mabboud.net/how-to-uglify-and-transpile-ecma6-javascript-with-a-maven-war-build/. But more steps are still needed : the result of transpilation are JS files but HTML imports are used in the HB server side code. So there should be additional step which replaces all HTML imports to JS tags..... Quite complicated.
  • And the last option: use real Chrome with xvfb. I would say it's most convenient option at the moment. But there are drawbacks : phantomjs is used as a maven plugin at the moment and it doesn't require anything to run the tests. It works out of the box. With Chrome we will have to either require additional not obvious configuration from the user which wants to execute the tests (locally) or we need a way to run the tests using remote Chrome (e.g. via Teamcity). Or both: a way to run the tests locally using local Chrome (if no access to Teamcity) and run tests remotely on Teamcity for those who don't want to configure local execution.

@Legioth Legioth closed this as completed in d456fa6 Mar 9, 2017
@Legioth Legioth modified the milestone: 0.0.19 Mar 9, 2017
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

No branches or pull requests

3 participants