Web app integration testing for sysadmins with cucumber-nagios

Interesting thought experiment:

  • Cucumber is kick arse way of describing the behaviour of a system.
  • Webrat makes interacting with websites blindingly easy.
  • Nagios is the industry standard for system/network/application monitoring.

What happens if you combine the three? You get [cucumber-nagios](http://auxesis.github.com/cucumber-nagios).

cucumber-nagios takes the results of a Cucumber run and outputs them in the Nagios plugin format. What does that actually mean?

A sysadmin can describe the behaviour of a system that they manage:

Feature: google.com.au
  It should be up
  And I should be able to search for things

  Scenario: Searching for things
    When I visit "http://www.google.com"
    And I fill in "q" with "wikipedia"
    And I press "Google Search"
    Then I should see "www.wikipedia.org"

Then they can run the feature through cucumber-nagios:

$ cucumber-nagios features/google.com.au/search.feature
Critical: 0, Warning: 0, 4 okay | value=4.000000;;;;

The curious can check out the code on GitHub, and the documentation on the project website.

UPDATE: There have been a few changes to cucumber-nagios since this post. Check out these two posts for more info.