Skip to content

Instantly share code, notes, and snippets.

@moklett
Created August 14, 2013 13:26
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save moklett/6231001 to your computer and use it in GitHub Desktop.
Save moklett/6231001 to your computer and use it in GitHub Desktop.
A tool to analyze ruby web app acceptance test coverage

Goals

  • For any given page/route, view a listing of the acceptance tests that exercise the page
  • Given a routes file, view a listing of routes which are unexercised by acceptance tests

Features

  • Runs as a rake task (can be run as a part of CI or a local test run)
  • Stores its data along with source code
  • Provides an in-browser graphical overlay/popup, available in development mode, that shows the acceptance tests that exercise any given page you browse

Possible Implementation

  • Install before/after hooks for each individual acceptance test that set the current test context (test file, line, name)
  • Install a global before_action hook that inserts routing information for the current action in to that context
  • Store the results as a flat file database in source control
  • Can be run independently as a rake task, or as a part of default rake tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment