Headless JavaScript Testing as of April 2011

Posted by Larry Karnowski Wed, 06 Apr 2011 01:31:00 GMT

I recently got an email asking about the current status of running headless JavaScript tests in a post-Blue Ridge world. They specifically asked if Jasmine would work with node.js. Here's my reply:

I'm using node.js plus zombie and vows to run headlessly. They run very fast on node.js, but I don't have a solution for running these headless tests in-browser. I definitely miss that from Blue Ridge.

I haven't used Jasmine on node, and it's probably possible, but since node is architected to be so asynchronous I expect you'll have issues eventually. Vows.js is built from the ground-up to be node-friendly.

Zombie is a fake web-browser (similar to env.js or Capybara/Webrat in Ruby). It's pretty good, but we've had some problems with some CSS selectors. This isn't really a problem in Zombie.js but in its html5 library dependency. Chad Humphries has been patching it. We've had to use some strange CSS selectors (using nth-child, etc) to get around it.

Tags ,  | no comments

Comments

(leave url/email »)

   Comment Markup Help Preview comment