Archive for December, 2010

JsChilicat: headless Javascript unit testing

Wednesday, December 22nd, 2010

One of my Avid colleagues started a Sourceforge project he calls JsChilicat to simplify automated unit testing of Javascript code. The tool invokes the Rhino Javascript engine with the EnvJS and [QUnit][qunit] frameworks on the JS side. EnvJS emulates the browser’s DOM to trick your Javascript into thinking its working in an actual browser. JsChilicat outputs JUnit-compatible XML, including console.log() output. It also does code coverage reports, but I haven’t played with that feature yet. To the best of my Google-fu, this is the only headless Javascript test kit that does code coverage.

The result is brilliant, but a little rough (ExtJS and EnvJS don’t play nice, for example). The documentation is currently insufficient, but just barely so. One or two examples of usage would be enough to reduce this to a half-hour learning curve.

I have no idea where the name comes from… Maybe it’s a pun in German or something? :-)