Hacker News new | past | comments | ask | show | jobs | submit login
Zombie.js -- headless full-stack testing using node.js (labnotes.org)
110 points by johnm on Dec 25, 2010 | hide | past | web | favorite | 14 comments

This looks very interesting.

If you're interested in testing on browsers with their heads intact, have a look at the Watir project, for which Opera has just released an implementation to complete the set: http://operawatir.com

Disclaimer: I work for Opera.

http://operawatir.com/ appears to be down.

Correct URL: http://operawatir.org/

Very interesting. At my work, we use Selenium for writing automated functional tests. I'm wondering how this will stack up against that... Is there a way to capture a screen shot when an assert fails? Often, that has been very useful in error resolution.

A "screenshot" wouldn't be easily done without a browser. ;-)

However, there ought to be a way to dump the DOM as HTML that can then be viewed in a browser. If the feature doesn't exist, it couldn't be all that difficult to write.

Oh wow. If this lets me test the bookmarklet I'm developing without setting up a fake environment, you have made my life much easier. Will try it out real soon.

This looks interesting. Would anyone be able to explain why I would use this over something like Capybara?

Side note: This is the same guy who gave us Vanity! Thanks!

1. Capybara is Ruby-specific (but generally awesome). This appears to be a pure JS solution as far as I can tell.

2. Capybara (currently) uses envjs for headless full-stack testing.

3. JSDOM, used by Zombie.js, certainly has different characteristics that may make it better/worse under some conditions.

4. If you're thinking Ruby, I doubt that any gems currently integrate with Zombie.js. However, that is also (somewhat easily) changed.

Sadly, full-stack testing in Ruby still kind of sucks. We spent a whole session at Ruby DCamp 2010 discussing the state of affairs. As much as we'd all like a robust headless solution, at the moment, the best browser simulator is still a browser.

YMMV. I've had mixed results with env.js. While not as sexy, I've been using Capybara with the Selenium driver with more success lately.

akephalos is also worth a look, as opposed to env.js. We've had much better support for things like jquery live() using (a slightly hacked) akephalos: http://robots.thoughtbot.com/post/1658763359/thoughtbot-and-...

Does this support SVG? Would it work for server-side rendering of Raphael.JS drawings?

I'm not too good with Javascript, but this would only work on domains you own, correct?

It'd work on any domain you like, but you need to run it on your own system.

I bet this could be used to write some very interesting Javascript-aware crawlers/scrapers.

Oh wow. Couldn't this easily be abused, if someone visited my Javascript page, that automatically entered a form under their IP?

it runs on node.js (a server side software), not a browser. So no need to worry about hijacking someones ip.

Registration is open for Startup School 2019. Classes start July 22nd.

Guidelines | FAQ | Support | API | Security | Lists | Bookmarklet | Legal | Apply to YC | Contact