Article

Make Your Tests Roar

Posted by Blake Watters.

PublicCategorized as Software Development.

Tagged with growl, plugins, rails, ruby

Alright, so I got fed up with seeing an F or an E early in my test run and having to wait out the remaining tests to know what went wrong. Its also a terrible distraction to have to look back at the console every few minutes to see where my tests are. Enter my growl_tests plugin. This plugin utilizes the oh so excellent Growl notification framework for OS X to deliver failures notifications to you as they happen. Thanks to Eric Hodel and his ruby-growl library for making this so damned easy to implement.

How to Add Growl Tests to Your Rails Apps

  1. Download and install Growl from the project site
  2. Install ruby-growl via Rubygems:
      $ sudo gem install ruby-growl
  3. Enable "Listen for incoming notifications" and "Allow remote application registration" in the Network tab of the Growl Preference Pane of your System Preferences
  4. Install my plugin into your application:
      $ ./script/plugin install -x https://secure.near-time.com/svn/plugins/trunk/growl_tests

That’s it! Your failing tests will now post Growl notifications. There are configuration switches in config.rb of the plugin folder, to allow you specify different hosts other than localhost, make the notifications sticky, raise their priority, etc. Out of the box, you are set for localhost.


Arrow_down Hide comments
  1. Ben Curtis said 6/10/06  

    This is very cool, and the timing couldn’t be better. I was just getting ready to try and add a reporting hook to the tests to talk with an API in Tesly (http://www.tesly.com/) to log the results of the tests.

  2. 22040_32x32_thumb John Wulff said  


Powered by Near-TimeTerms of Services | Privacy Policy | Security Policy |