sensu/sensu-community-plugins — pull request #702 by simondean (2014-08-05 22:05:25+00:00)
Title: Added a check for executing Cucumber tests

This pull request implements a check for executing Cucumber tests. It supports any version of Cucumber that i) can be executed from the command line and ii) can write a JSON report to standard out. That includes supporting the ports of Cucumber for Ruby and node.js (called cucumber-js). It also supports parallel-cucumeber-js (https://www.npmjs.org/package/parallel-cucumber) which can be used to execute cucumber-js tests in parallel.

The check can execute multiple Cucumber scenarios, and that's the recommended way to use it. The check sends a separate event to the local Sensu socket for every scenario. This means you can easily execute scenarios without losing visibility of which scenarios are failing.

For scenarios that execute successfully, the check sends a metric event to the local Sensu socket. The metric event includes metrics for:
- Scenario duration (how long it took to execute every step in the scenario)
- Number of steps in the scenario
- Duration of each individual step in the scenario

The metrics can be used to stop trends in the execution time of each scenario; e.g. to spot when a particular activity is getting slower over time.

The pull request includes a full set of rspec tests for the check. It also includes a change to `.travis.yml` that enables Travis CI builds for Ruby versions 1.9.2, 1.9.3 and 2.0, to ensure the rspec specs pass on those versions of Ruby.