I was working on some Javascript today, and in the middle of working on the script I thought, “Man, it would be nice if I had a quick, easy unit testing environment to test stuff out as I write this”. Then it hit me – I do.

I forgot I wrote this simple unit testing framework back in 2006. It was part of Neuromancer (one of those old school Ajax libraries), and I had always planned on release it as it’s own thing, but I never really did.

Here is a short movie on how it works:

The positive reasons for using this are 1) the interactive shell 2) the fact it works from the desktop and off a live server and 3) you can run it in different browsers so you can test in IE / FF / Safari rather easily (as opposed to unit testers that just work in FF or within a JRE).

I use this, and unit testing in general, as a way to easily develop parts of a system in isolation – instead of running the code through the whole server / process. An added side effect is the unit test. However, I find the ability to run small parts of the code more beneficial than “writing test cases” (which in the end is the same thing I guess). But that’s why I call it more of a Playing Around Area than a Unit tester.

You can download the code from the JUTest project page.