views:

374

answers:

3

Hi,

I am trying to use Cucumber for a Rails project on Windows. Unfortunately the time it takes to run a scenario is making BDD impossible. I understand this is largely due to the time taken by Rails to load up under windows. Does anyone have any ideas about how I can speed things up. e.g Is it possible to call Cucumber inside a Rails console to avoid the load up delay.

Cheers.

A: 

Have you tried running cucumber without db:test:prepare? What about setting t.fork = true # set to false for performance increase (both in /lib/tasks/cucumber.rake)

Snuggs
I'm running cucumber directly so db:test:prepare is not being run. According to the cucumber docs using the cucumber rake task will add some additional start up time.
fatboyroy
+2  A: 

Windows is now supported by Spork! http://wiki.github.com/timcharper/spork/

Spork is a test server than can be invoked via DRb.

On POSIX systems Spork uses Kernel.fork.

On Windows forking is not an option so Spork creates a pool of preloaded processes which avoids the huge Rails start up time.

At the moment it only works with win32/mingw Ruby because it depends on the win32-process gem.

A big thanks to the Spork Guys for doing such a great job and making cucumber BDD possible on Windows.

Please note that I have only tried Spork with

  1. Windows XP
  2. Rails 2.3.5
  3. Ruby 1.9.1 from rubyinstaller.org
fatboyroy
A: 

Is this just my machine, or is the console output of Spork running on Windows extremely slow?

Nightscape