[LRUG] Speeding up Cucumber

Steve Tooke steve.tooke at gmail.com
Fri Mar 14 06:49:38 PDT 2014


To echo what Murray said its most likely a slow boot time for your app.
Especially if it's been around a while and has a number of included gems.

There are a couple of things you can do to establish this.

First of all try a scenario that has a step that does nothing.

If this is taking a significant amount of time you can ease the startup
costs using spring or Zeus as suggested.

If this doesn't seem to be too bad, you could try targeting a static page
in your public directory. If this is significantly slower the issue is
probably something around the web driver you are using. (Make sure you are
setting this scenario up in the same way as your slow scenario, the same
tags etc).

If the static page isn't too bad, it's likely something around rendering
the actual page or setting up the context for the scenario that's slow.

Steve

On Friday, 14 March 2014, Murray Steele <murray.steele at gmail.com> wrote:

> A classic problem would be that it’s not cucumber, but the app itself has
> a long boot up period.  If the app takes a while to start up as a normal
> server or console then perhaps look at tools like spring(
> https://github.com/rails/spring) or zeus(https://github.com/burke/zeus) to
> pre-load the environment so the tests don’t take the boot up hit to run.
>
>
> On 14 March 2014 12:41, Jon Wood <jon at ninjagiraffes.co.uk<javascript:_e(%7B%7D,'cvml','jon at ninjagiraffes.co.uk');>
> > wrote:
>
>> Hello El Rug,
>>
>> I'm currently at my wits end with a Cucumber suite, but I also don't have
>> any decent ideas on how to improve it. Running a really simple feature
>> which loads a page and asserts some content is found currently takes over
>> two minutes, which as I'm sure you can imagine makes doing BDD properly
>> quite awkward.
>>
>> To give a little context this is a Rails 2.3 application, running on Ruby
>> 1.8. Upgrading to a newer version of Ruby is in the backlog, but isn't a
>> viable option right now.
>>
>> So, does anyone have any tips on speeding things up, or even just working
>> out where I should start working to speed them up?
>>
>> Thanks,
>> Jon
>>
>> _______________________________________________
>> Chat mailing list
>> Chat at lists.lrug.org <javascript:_e(%7B%7D,'cvml','Chat at lists.lrug.org');>
>> http://lists.lrug.org/listinfo.cgi/chat-lrug.org
>>
>>
>

-- 
/tooky
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lrug.org/pipermail/chat-lrug.org/attachments/20140314/14cb7e41/attachment-0003.html>


More information about the Chat mailing list