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'

Sorry, comments are closed for this article.

About


Pragmatic by design. Idealistic in nature. Short term pessimist. Long term optimist. Married with kids. Curious by nature.

Follow/Contact Me

Email:
  derek@integrumtech.com
Tumblr:
  brainspool


www.flickr.com

Archives

»

»

»

» May 2008 (1)

» April 2008 (2)

» March 2008 (2)

» February 2008 (5)

» January 2008 (8)

» December 2007 (13)

» November 2007 (16)

» October 2007 (4)

» September 2007 (6)

» August 2007 (6)

» July 2007 (1)

» June 2007 (1)

» May 2007 (9)

»

» March 2007 (3)

Community Oriented

RailsConf 2008

Recommend Me