views:

52

answers:

2

We have been using Cucumber for some time now, and now have over 200 scenarios. Our startup speed is getting very slow, which makes a big difference in our edit-test-commit cycle. The problem seems to be the parsing of the feature files. Is there a way we can speed this up?

NOTE: We are using IronRuby, which has a known slow startup time. However, this startup time (about 30 seconds) is small compared to the time spent parsing (2-3 minutes) which we can see because of the side-effects of our env.rb code.

EDIT: Running only specific tags doesn't help reduce parse time because Cucumber still has to parse all the files to read the tags in the first place.

A: 

You could just test the scenarios you're working with at the moment. If you set the tag @wip (word in progress) before a Scenario and run 'rake cucumber:wip' you will only run the scenarios that contain the tag @wip

jordinl
This reduces total run time, and we are already doing this. But it doesn't change parse time, because Cucumber still has to parse all the files in order to read the tags in the first place. I've edited my posting to reflect this.
kerkeslager
A: 

It is possible to run only feature files in a specific directory by passing the directory in to cucumber. This causes only the features under that directory to run, and more importantly, it doesn't parse anything in other directories. So one can reduce run time by organizing feature files into directories and only running the relevant feature directory.

kerkeslager