Every repository with this icon (
Every repository with this icon (
Running Features
There are several ways to run your features. This page lists the most common ones. Any of these techniques also lets you define common command line options in a cucumber.yml file.
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: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.
cucumber features --name "Failed login"
…will run the scenario(s) named “Failed login”
You can also use tags to specify what to run.
Using Rake
From the command line:
rake features
This requires a Rakefile with a Cucumber task definition. For example:
require 'rubygems'
require 'cucumber/rake/task'
Cucumber::Rake::Task.new(:features) do |t|
t.cucumber_opts = "--format pretty" # Any valid command line option can go here.
end
If you are using Ruby on Rails this task is defined for you already. For more information please see the detailed page about using rake.
Using TextMate
See the Cucumber.tmbundle documentation
Using RCov
Using other build tools
Maven and Ant are described in JRuby and Java. MSBuild and Nant should be under IronRuby and .NET. Anything else – please contribute to this wiki!






