-
Notifications
You must be signed in to change notification settings - Fork 28
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
Headless testing with a real browser (not PhantomJS) #3
Comments
Comment by samhatoum do we need to do anything for this? |
Comment by kamek-pf Some instructions might be nice if this is already supported. @samhatoum I found a link you posted on #169 about |
Comment by riiiiizzzzzohmmmmm @sanjo @samhatoum First, thank you both so much for all you've done to bring bonafide testing techniques to the Meteor community. I began working wth Velocity, Cucumber, and Jasmine towards the end of the summer. I've got a nice little regression suite that I can run on my mac just fine. Now, I'm working on my CI setup and simultaneously trying to keep up with the deprecation of Velocity, et. al., and migration to chimp. I'm having some trouble, though. I've got an Ubuntu 14.04 server. I've got Node 4.2.3, NPM 2.14.7, OpenJDK 1.8.0_72, Google Chrome 47 binary, ChromeDriver 2.20. I've also got meteor installed. When I boot my meteor app and tail the cucumber logs (old school Velocity style, I know), I get to the point where it says that the mirror is started and "Cucumber is running," but then it crashes saying that ChromeDriver timed out while attempting to start: => App running at: http://localhost:51913/
[velocity] Mirror has established connection with Velocity.
[xolvio:cucumber] Cucumber is running
[chimp][hooks] BeforeFeatures hook had error
{ [Error: unknown error: Chrome failed to start: exited abnormally
(Driver info: chromedriver=2.19.346067 (6abd8652f8bc7a1d825962003ac88ec6a37a82f1),platform=Linux 3.13.0-68-generic x86_64) (WARNING: The server did not provide any stacktrace information)
Command duration or timeout: 60.63 seconds
Build info: version: '2.47.1', revision: '411b314', time: '2015-07-30 03:03:16'
System info: host: 'my-ip-internal', ip: 'my-ip', os.name: 'Linux', os.arch: 'amd64', os.version: '3.13.0-68-generic', java.version: '1.8.0_72-internal'
Driver info: org.openqa.selenium.chrome.ChromeDriver]
message: 'unknown error: Chrome failed to start: exited abnormally\n (Driver info: chromedriver=2.19.346067 (6abd8652f8bc7a1d825962003ac88ec6a37a82f1),platform=Linux 3.13.0-68-generic x86_64) (WARNING: The server did not provide any stacktrace information)\nCommand duration or timeout: 60.63 seconds\nBuild info: version: \'2.47.1\', revision: \'411b314\', time: \'2015-07-30 03:03:16\'\nSystem info: host: \'my-ip-internal\', ip: \'my-ip\', os.name: \'Linux\', os.arch: \'amd64\', os.version: \'3.13.0-68-generic\', java.version: \'1.8.0_72-internal\'\nDriver info: org.openqa.selenium.chrome.ChromeDriver',
type: 'RuntimeError' }
Error: unknown error: Chrome failed to start: exited abnormally
at Object.Future.wait (/<home_folder>/.meteor/packages/xolvio_cucumber/.0.19.4_1.10ydvsz++os.linux.x86_64+web.browser+web.cordova/npm/node_modules/chimp/node_modules/fibers/future.js:420:15)
at Object.<anonymous> (/<home_folder>/.meteor/packages/xolvio_cucumber/.0.19.4_1.10ydvsz++os.linux.x86_64+web.browser+web.cordova/npm/node_modules/chimp/node_modules/xolvio-sync-webdriverio/node_modules/xolvio-fiber-utils/index.js:48:19)
at Object.<anonymous> (/<home_folder>/.meteor/packages/xolvio_cucumber/.0.19.4_1.10ydvsz++os.linux.x86_64+web.browser+web.cordova/npm/node_modules/chimp/lib/session-manager.js:137:21)
at initBrowser (/<home_folder>/.meteor/packages/xolvio_cucumber/.0.19.4_1.10ydvsz++os.linux.x86_64+web.browser+web.cordova/npm/node_modules/chimp/lib/cucumberjs/world-helper.js:149:15)
at Object.worldHelper.setupBrowserAndDDP (/<home_folder>/.meteor/packages/xolvio_cucumber/.0.19.4_1.10ydvsz++os.linux.x86_64+web.browser+web.cordova/npm/node_modules/chimp/lib/cucumberjs/world-helper.js:191:7)
at /<home_folder>/.meteor/packages/xolvio_cucumber/.0.19.4_1.10ydvsz++os.linux.x86_64+web.browser+web.cordova/npm/node_modules/chimp/lib/cucumberjs/hooks.js:8:17
at /<home_folder>/.meteor/packages/xolvio_cucumber/.0.19.4_1.10ydvsz++os.linux.x86_64+web.browser+web.cordova/npm/node_modules/chimp/lib/cucumber-wrapper.js:114:43 It seems like this has something to do with trying to start chrome not in headless mode (i.e. with Am I missing something? How do I run my Cucumber tests against Chrome on an Ubuntu server? |
Comment by Sanjo @riiiiizzzzzohmmmmm With the latest chimp, you no longer need the xolvio:cucumber package. So, remove it. I think you use a version of xolvio:cucumber that had a bug with the environment variables. If you still want to use xolvio:cucumber, make sure you use the latest version. |
Comment by samhatoum @kamek-pf take a look here: It looks like there's an pm package to control xvfb - could be an interesting add to Chimp... hmmm... https://www.npmjs.com/package/xvfb |
Comment by samhatoum also, CI servers like Circle and Travis have this built in |
Comment by kamek-pf @samhatoum Yeah I'm using CircleCI and I just noticed it does work out of the box, awesome :) |
Comment by riiiiizzzzzohmmmmm So, yeah, it turns out I just needed to use screen to start an Xvfb session before running my Velocity tests. I also needed to set a @samhatoum It does look like it would be cool if Chimp could leverage that @sanjo I will definitely be migrating away from the My ultimate goal is to be able to kick off concurrent builds of N instances (of Meteor apps) on ephemeral EC2 instances, so I can run different test suites and deploy. |
Comment by samhatoum
Would love that! With tests of course :)
you can still use them, just move them to a package called fixtures and it will work without any other changes. Post back if you want help
You should check out https://github.com/xolvio/whirlwind |
Comment by SimonSimCity Got it working. See: https://github.com/SimonSimCity/bitbucket-meteor-headless-browsers |
Comment by jimmyhoneycutt Will chimpjs work with headless chromium? Are there any instructions on how to set this up? |
Comment by migerh @jimmyhoneycutt I tweaked the chimp config of our project to get it running with chrome headless: https://github.com/4minitz/4minitz/blob/9096b5ed2503f0a24c6460c64e75f0a9da4a5c02/.meteor/chimp_config_headless.js. To run chimp with that config provide it as a parameter In the Unfortunately, X or xvfb is apparently still required for |
Comment by fatso83
As of July 22, this is no longer the case, @migerh. ChromeDriver 2.31 has been released and contains fix to this bug. |
Comment by SimonSimCity @jimmyhoneycutt and everyone who 👍'ed it ... The repository I linked here uses Docker to set up a virtual machine to run the tests of your meteor-project. Here's a quick reference of how to read these files: https://www.digitalocean.com/community/tutorials/docker-explained-using-dockerfiles-to-automate-building-of-images#dockerfile-commands-instructions It's quite straight forward. You need to install If you're done with that, you can simply run your
And you can run your command that opens f.e.
Some sugar ... If you want to see this virtual screen, you can install
And run f.e. I hope this helps you getting started on it 😉 |
Comment by samhatoum thank you @SimonSimCity! |
Issue by Sanjo
Monday Apr 13, 2015 at 18:22 GMT
Originally opened as xolvio/chimp#6
See https://github.com/vvo/selenium-standalone#running-headlessly
The text was updated successfully, but these errors were encountered: