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

Zombie.js headless browser #30

Closed
benjamine opened this issue Aug 15, 2012 · 5 comments
Closed

Zombie.js headless browser #30

benjamine opened this issue Aug 15, 2012 · 5 comments

Comments

@benjamine
Copy link

zombie.js is probably the best headless browser out there.

http://zombie.labnotes.org/

it's easier to install, node.js based, "insanely" fast, and has a great API.
I'd love to see it supported.

@vojtajina
Copy link
Contributor

Using jsdom + being insanely fast ? Not sure with that :-D

Anyway, would be nice to have support for Zombie. Testacular communicates through socket.io, so you can use it basically with anything, that can do HTTP and execute javascript.

I just tried to make it work and I'm giving up (getting working PhantomJS took me about 3minutes). Zombie loads all the files, start jasmine execution, but never gets to second spec, never even reports result of the first spec. Tried mocha, but doesn't work either.

Tried to run just simple jasmine html runner with no success either. Pretty sure someone can figure this out, but I don't have time for debugging Zombie now :-D

var Browser = require("zombie");
var browser = new Browser();

browser.visit("http://localhost:9876/", {debug: true}, function () {
  console.log(browser.errors);
  browser.dump();
});

@benjamine
Copy link
Author

jsdom probably won't be as fast native, what makes it faster it's the node V8 javascript engine.
I'm still evaluating testacular, but if I start using I might give it a shot at helping with a pull request.
Thanks!

@vojtajina
Copy link
Contributor

Awesome, pull request would be great. I would definitely help you if need any assist.

Note, that for headless testing, you can use PhantomJS (which has all the DOM apis, because it's wrapper around real WebKit). Although, real Safari is way faster than headless PhantomJS - so as long as Testacular can start the browser and keep it running in the background, there is really no reason for PhantomJS IMHO.

I don't expect Zombie to be faster either. There is V8 in Chrome as well and Safari's Nitro is even faster...

@benjamine
Copy link
Author

yep, you're right, maybe I'm overestimating zombie.js.
real webkit sounds nice, I've worked with zombie.js and sometimes you have to struggle with odd behaviors (and I'm not interested in working to get my app support an unreal browser).
I suppose I'll give PhantomJS an opportunity.
I don't have benchmarks to ensure it would be faster than Chrome or Safari Nitro, but the other reason to go headless is running tests on build servers, although you can use slave VMs to instantiate real browsers.

@vojtajina
Copy link
Contributor

We use real browsers on CI server, that's the purpose of CI, test against many REAL browsers.

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

2 participants