Fun with Autotest
October 19th, 2007
Being on team that really takes testing seriously is very rewarding. Switching gears into a test first mentality and doing behavior driven development (BDD) seems to incite this passion for having a good tool box to help get your job done. Usually this comes in the way of automation. During the development process it is great to have your tests/specs run automatically to get that instant feed back that something is broken. We happen to use autotest currently to meet that need.
As anyone doing a lot of development work knows, desktop space is limited (as well as screen real estate). So, having another window open to monitor these automated tests isn’t ideal. If you hide the window they run in and have to bring it back up to check the results, the impact of the automation is greatly diminished because you have added another manual step. Thankfully those of us using OS X have a nice notification system called growl available. It allows applications to send notification for display in an unobtrusive, yet powerful way.
Autotest plus test/unit has had this for some time and many people in the rspec community have ported it to work with rspec. Since “Integrum”: uses rspec the rest of this post will be focused only on rspec. In a nutshell, every time autotest hits a fail or success it makes a call to growlnotify. Growlnotify then sends a growl message to OS X for display to you. The beauty of this is it displays a little icon with that message.
Szeryf took and made a DoomGuy version of autotest growl that completely rocks. The more specs that fail the worse your DOOM marine gets. Get specs passing and he heals. Jeremy Seitz took it to the next level and added sound. Chris Irish spent some time getting DOOMGuy to work with rspec and our setup. Jade Meskill did some clean up and added some functionality.
This was all well and good. rSpec with autotest DoomGuy continued along happily at Integrum. Not being a DOOM fan, it depressed me seeing a bloody chubby marine on a regular basis. So one day I looked over at someone playing World of Warcraft and thought some of the icons on the screen would make very nice “your specs are failing” notifications. So I spent some time slurping WoW icons and integrating them into WoW Autotest for rspec. I combined the work done above to call growlnotify and replaced with WoW icons and some random image selection based on how severe test failures are.
All Specs Passing

Oops we have a Failure

Crap now we have TWO Failures

Sigh we can’t seem to fix them, rspec is full of rage

All Specs Passing Again!

Originally, I was going to make a Horde set and an Alliance set, but you know what? those emo Alliance pansies don’t deserve to get WoWAutoTest goodness, so it didn’t happen. I removed the Horde references and made more neutral. You can download the custom .autotest file here and a zip of the .autotest_images here.
Full Icon Set





0 comments have been made on 'Fun with Autotest'