Access whitepaper

FireUnit: JavaScript unit testing extension for Firebug

Friday, December 19, 2008 by Randy Cox
John Resig, creator of jQuery and a member of the Firebug development team, announced yesterday on his blog the release of a JavaScript unit testing extension to Firebug/Firefox called (what else?) FireUnit.  It's a very young tool, so right now it doesn't have a ton of features.  There are APIs for asserts, string compares (including regexes), simulating UI events like mouseDown, clicks, and keypresses, as well as running a batch of tests that are defined in a specified HTML file.  Test results are published to a new "Test" tab in Firebug.

The tool was originally intended for testing of Firebug and other Firefox extensions.  That's a task that can't be easily accomplished with other JavaScript unit testing tools since other tools can't access Firefox's browser "chrome" to get at the extensions.  Still, it has potential for general web application unit testing as well.  I'm going to give it a try on some front-end code here at Compendium.  We have a good system of unit testing of our back end code using phpUnit, but it's a weak area for our front end.  Unfortunately FireUnit won't be usable for automated testing.

FireUnit is open source software licensed under the MPL.

Release announcement: http://ejohn.org/blog/fireunit/
FireUnit website: http://fireunit.org/
FireUnit wiki on GitHub: http://github.com/jeresig/fireunit/wikis


Spread the Word

Comments for FireUnit: JavaScript unit testing extension for Firebug

Leave a comment





Captcha

© 2009 Compendium Blogware
All Rights Reserved