Unit Testing in the Cloud with Node
I’ve been running on little sleep this weekend, why? It’s the Node.JS Knockout:
Node.js Knockout is a coding contest inspired by Rails Rumble. The rules are simple: teams of up to 4 have 48-hours to build any node.js-based web project they can imagine.
I have been hacking away on an entry for this competition with help from my friends Ben Vinegar and Jaco Joubert. Our project:

Running on a server-side mock-browser, a secured sandbox, WebHooks, and a lot of elbow-greese, CloudQ runs your client-side JavaScript on the server, so you don’t have to.
- In the root of a public Github repo put a folder named ‘test’.
- Place your JavaScript QUnit tests in this folder and a file named ‘index.html’ that points to them. For an example, see this repo.
- Go to CloudQ and enter the path to the root of your Github project (for the repo above I’d enter ‘http://github.com/bcoe/schedgy’).
CloudQ executes the tests it finds in index.html directly off of your Github account. But wait, there’s more, you can setup a commit-hook on Github. CloudQ will tweet when one of your builds fails, just follow us @CloudQunit.
We’re hoping some JavaScript hackers will help us test our service before the competition ends today, please give me a shout if you’re interested.
Here’s some Important Information:
A repo setup to use CloudQ:
http://github.com/bcoe/schedgy
CloudQ is hosted here:
http://nko-team-discovery-channel.heroku.com/
I’ll write a thorough follow-up post after the competition, but here’s some quick thoughts while I’m in the thick of things:
- Node is getting fairly mature, building CloudQ was a pleasure compared to work I was doing on Node a few months ago.
- For certain classes of problems, e.g. WebHooks, asynchronous design is very elegant, Node lends itself beautifully to it.
- Competing in this competition was a really fun way to hone my skills. If you’ve never tried out a hacking competition, give it a shot.