Tuesday, October 14, 2008

Autotest notifications in Ubuntu, Mac and Windows

Autotest part of the ZenTest package is a great testing tool that will automatically run your RSpec tests when you make a change to any of the source files.

If you don't know about RSpec then you must have been living in a cave and I suggest you check that out first.

Today I am going to teach you how to setup automatic notifications in Ubuntu that will allow you to display the results of your tests in nice little window like so.



First make sure you have the libnotify binaries installed.

$ sudo apt-get install libnotify-bin

Then you'll need to install the actual autotest notification gem

$ sudo gem install carlosbrando-autotest-notification --source=http://gems.github.com

Easy enough. Ok now for the hard part of configuring it.... oh wait, did I say hard? I meant ridiculously easy.

$ sudo an-install

The above command will first backup then overwrite your ~/.autotest config file so you may just want to manually append the following if you have any existing configurations.

# ~.autotest
require 'autotest_notification'
SPEAKING = false
DOOM_EDITION = false
BUUF = false
PENDING = false
STICKY = false

As you can see there are a few extra options you can play with till your little heart is content. You can even get notified by voice if you install espeak and pass a '-s' switch to an-install.

An alternative to automatic notifications in Ubuntu is mumbles which you may want to check.

What about Mac and Windows?

The best thing about automatic notifications is that is fully compatible with Mac OS and Windows.

For Mac you'll need to install Growl and in Windows you'll need Snarl. Installation is just as easy but slightly different in these enviroments so consult the README.txt for detailed instructions.

Enjoy

No comments: