Skip to content

Instantly share code, notes, and snippets.

@textarcana
Created December 22, 2009 01:47
Show Gist options
  • Star 6 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save textarcana/261424 to your computer and use it in GitHub Desktop.
Save textarcana/261424 to your computer and use it in GitHub Desktop.
Cucumber cheatsheet

Cucumber cheatsheet

Best cheatsheet is: cucumber --help

Output formats

Reporting

Notification formats, in increasing order of verbosity:

cucumber --format progress
cucumber --format stepdefs
cucumber --format html
cucumber --format pdf

--format rerun would be helpful, as it enables automatically re-running failing tests. However that is broken (but they're working on it) in Cucumber 0.5.1 as of Dec 21 2009.

--format junit would also be useful: it produces an XML report format like JUnit's. That report can be consumed by CruiseControl and numerous other tools. But that format also appears (I only checked on 1 machine so far) broken as of 12/22/2009.

Debugging

In order of usefulness.

cucumber --format usage --dry-run
cucumber --format tag_cloud
cucumber --format usage
cucumber --format debug

Note that usage performs profiling when invoked without --dry-run.

Dependencies

Most deps are installed automatically. But some must be manually installed:

 gem install prawn
  1. Prawn is needed for PDF output.

Links

  1. Cucumber/Webrat cheatsheet
  2. Noah's Delicious.com bookmarks for Cucumber
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment