Skip to content
This repository was archived by the owner on Nov 16, 2018. It is now read-only.

Running Features

bmabey edited this page Aug 13, 2010 · 27 revisions

Using the Gem’s ‘cucumber’ Command

Assuming you’ve installed cucumber as a gem, run this at a command prompt to see the options for running features:

cucumber --help

For example

cucumber features/authenticate_user.feature --line 44 --format html > features.html

…will run the scenario defined at line 44 of the authenticate_user feature, format it as HTML and pipe it to the features.html file for viewing in a browser.

Defining ‘profiles’

Profiles allow you to store and reuse commonly used cucumber arguments for a project in a cucumber.yml file. For example, by having this in your cucumber.yml at your project root:


default: --format profile features
html_report: --format progress --format html --out=features_report.html features  

You can reuse the arguments listed above:


cucumber --profile html_report

It is important to point out that by simply running ‘cucumber’ the default profile will be used.

Using the rake task (in a rails app)

rake features

Clone this wiki locally