Acceptance tests for Web X-Ray Goggles
Switch branches/tags
Nothing to show
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.

These are acceptance tests for the Web X-Ray Goggles project. They're written in RSpec using Watir-WebDriver.

Acceptance testing

Unlike unit tests, acceptance tests should be very high-level, describing the functionality and features an end-user wants to see. Additionally, the tests should be highly expressive such that an end-user can make sense of their intent and, ideally, add to the suite of acceptance tests themselves. RSpec was chosen for its readability and ability to run Watir-WebDriver (although a tool like Cucumber could drive this even farther).

Running the tests

Install rspec

Assuming you have ruby and rubygems installed, run:

$ [sudo] gem install rspec

Using rspec

The easiest way to get and run this test suite is:

$ git clone git://
$ cd ./webxray-acceptance
$ rspec

By default, rspec looks for ./spec/**/*_spec.rb and runs all the files it finds.

RSpec output formatting

A nice alternative output can be specified like so:

$ rspec --format documentation  

or more concisely:

$ rspec -f 

See rspec -h for more formatters.


The project Rakefile also defines some shortcuts and defaults for running the suite. rake -T will list the available targets.

To do

  • Moar tests!
  • It would be nice to easily control where the bookmarklet points (i.e. DEV vs. production goggles)
  • Option to run headlessly
  • RSpec-isms
  • RSpec has lots of utilities that increase conciseness and expressivity—explore them!
  • Move from testing on to a checked-in page