Our companies JSUnit test experiences

So at my employer, we’ve recently switched to Scrum for our development purposes and the transition has been, difficult. It was easy to jump off the cliff, but were hitting every tree branch on the way down. I’ll have to write another post about all that, because I would never get to JSUnit if I blabbed on and on about Scrum.

To summarize that future post in short, we now have time and the will to accommodate Javascript testing, off I go to find a nice framework. There was two frameworks nicknamed JSUnit but only one seemed really professionally ready. So I installed, implemented, and experienced.

This review is made up of two separate but equally important parts, the bad, and the good, these are thier stories.

Da Dummmmm The Bad

  • Does not allow Remote Execution of local test scripts
    • Being a self proclaimed WebDev god, I really should be able to figure this one out exactly, though the only thing I’m able to deduce so far is that the security settings won’t let me run scripts from so many domains in the context JSUnit needs. This is a moderate hindrance as I wanted to be able to have the JSUnit test runner application to be run on one machine and I could tell everyone to navigate to this server to use it, but instead I had to get everyone to install the test runner themselves.
    • I was able to have the test pages reference the jsUnit application script remotely, this needed to be on every page and so its nice that it was able to be centralized.
  • Does not allow selection of tests, does not display names of tests run.
    • Am I spoiled by NUnit’s simple but informative layout? And it does list the names of the failing tests, with a button that you can press to see why it failed. But It still seems like, this should be a nice little UI that would show me all the info I need to get a clear picture on what happened in one glance.
  • Does
    not allow multiple pages to be run.

    • I’ve not digged into how JSUnit works, but being able to cue up a list of pages with tests on them would be very helpfull. This may also solve the issue with refreshing the page and losing the URL to your test page, irritating. Grrrr!
  • Total lack of ability test an Asynchronous operation.
    • This is the 06, I need to be able to unit test an AJAX call. Obviously I can make the call, but I can’t validate the results in any way.

The Good, Yaaaay!

  • Damn, that was kinda easy.
    • That great satisfied feeling was still there, it made the code super slim and easy, and it even made me modularize it to just about the right level.
    • Installation is almost to simple, I don’t think people around here feel like its a solid framework when you just have to setup a virtual directory, unzip and navigate to the test runner. Wheres the configuration file? Don’t I have to install some file I don’t know exists?
  • Pat on the back and a blind eye.
    • This process has been well recieved, those with a stake in the script have been very encouraging to me to get this implemented. Testing is excited that they will have additional coverage, that they don’t even have to write. Management is excited because they actually know the value of unit testing. Everyone else, well they don’t have quite the infatuation with Javascript as I do, and thier lust for this framework has been tempered so far. We don’t really have a lot of javascript projects going on right now, so that might change as the work comes along, but until then…
  • It does its job
    • For all the points against it for poor UI, its still doing a very good job at its core function, which is to unit tests javascript. I feel more comfortable now then I ever have about script in the past, and its never been cleaner.

Leave a Reply

Please log in using one of these methods to post your comment:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s

%d bloggers like this: