views:

189

answers:

4

Reason why I want to run them individually, is because I need to have them individually set up in my rake file, because, My Java Heap Space fills up when I run them all together

A: 

If you use cuke4duke you can run this separately from ant or maven.

The manual states that you can use the same options as cucumber. So I would expect you can pas the filename of the feature you want to run on the commandline.

Peter Tillemans
A: 

You can use script/cucumber to do individual files.

Assuming you are in the root directory of your project and you have a features folder:

./script/cucumber features/adding_products.feature

Edit: After re-reading your question, are you looking to do individual features, or scenarios?

theIV
+2  A: 

You can use:

rake FEATURE=features/adding_products.feature cucumber

but the Using Rake wiki page advises against using rake for anything but on a CI server because it's slower to start. Just use the cucumber command line instead.

Bryan Ash
+1  A: 

The correct way is to run it using the cucumber executable if you're using Rails 2, or bundle exec cucumber if you're using Rails 3 (and thus Bundler).

To run a specific feature:

[command] features/signing_in.feature

To run a specific scenario from that feature:

[command] features/signing_in.feature:6

The line number can be any line inside that feature, but is usually the first line.

If you run rake cucumber:ok and some scenarios fail, at the bottom of the output you will see something like this:

cucumber features/sigining_in.feature:6 # Signing in via form

You can triple-click this line and paste it into your terminal to just run that scenario.

Ryan Bigg