Wednesday, March 25th, 2009

TestSwarm: Scaling JavaScript Tests

Category: Browsers, JavaScript, Testing

John Resig is working on a new tool that tries to help us scale our JavaScript testing. When building an Ajax application, how nice would it be to have a system running tests across multiple browsers and platforms? This is necessary for anything more than a toy, especially since we have some flexible software that allows us to shoot our feet very easily indeed. We need to fix this:

All of this leads up to a new project that I’m working on: TestSwarm. Its construction is very simple. It’s a dumb JavaScript client that continually pings a central server looking for more tests to run. The server collects test suites and sends them out to the respective clients.

All the test suites are collected. For example, 1 “commit” can have 10 test suites associated with it (and be distributed to a selection of browsers).

The nice thing about this construction is that it’s able to work in a fault-tolerant manner. Clients can come-and-go. At any given time there might be no Firefox 2s connected, at another time there could be thirty. The jobs are queued and divvied out as the load requires it. Additionally, the client is simple enough to be able to run on mobile devices (while being completely test framework agnostic).

Here’s how I envision TestSwarm working out: Open Source JavaScript libraries submit their test suite batches to the central server and users join up to help out. Library users can feel like they’re participating and helping the project (which they are!) simply by keeping a couple extra browser windows open during their normal day-to-day activity.

The libraries can also push manual tests out to the users. A user will be notified when new manual tests arrive (maybe via an audible cue?) which they can then quickly run through.

All of this help from the users wouldn’t be for nothing, though: There’d be high score boards keeping track of the users who participate the most and libraries could award the top participants with prizes (t-shirts, mugs, books, etc.).

The framework developers get the benefit of near-instantaneous test feedback from a seemingly-unlimited number of machines and the users get prizes, recognition, and a sense of accomplishment.

If this interests you then please sign up for the alpha.

Posted by Dion Almaer at 7:16 am
2 Comments

+++--
3.7 rating from 21 votes

2 Comments »

Comments feed TrackBack URI

Will it be open source so a company can setup their own farm of VMs to do this distributed testing?

Comment by Liquidrums — March 25, 2009

Have to admit I thought this was pretty awesome when I read about it, especially when you read John’s reasons why he is pushing for it.

Comment by doehlman — March 26, 2009

Leave a comment

You must be logged in to post a comment.