I’m running a Rails 3 app on a Windows box, that includes the following Cucumber scenario –
Scenario: Creating a project
Given I am on the homepage
When I follow "New Project"
And I fill in "Name" with "TextMate 2"
And I press "Create Project"
Then I should see "Project has been created."
(the scenario is taken from the Manning “Rails 3 In Action” book). When I run the ‘bundle exec cucumber’ command I have to wait roughly forty seconds until I receive a result (there is currently only one scenario in my project – so it’s taking 40 seconds to run a single scenario). I’d hoped to get feedback much faster via Cucumber tests. Is slow feedback from Cucumber just a fact of life or is there a way of speeding things up?
I have a very similar project with one cucumber scenario and it takes 39 seconds to run it on my Windows machine.
The problem is that ruby is not optimized to run on Windows. Some info is here http://en.wikibooks.org/wiki/Ruby_Programming/Installing_Ruby#Windows_is_slow.
My solution for this problem is installing Ubuntu on a VirtualBox and doing all Rails development inside it. It’s a good compromise while I’m still not comfortable to work on Ubuntu all the time. The same cucumber scenario takes 10 seconds to run on the virtual Ubuntu, which is more or less acceptable.
On a “real” Ubuntu installation it takes 7 seconds.