[LRUG] Large Slow Test Suites

Nick Griffiths nicobrevin at gmail.com
Wed Dec 4 23:16:23 PST 2013


For database tests, you can try switching to an in memory database to
increase test times.  We were hacking this with MySQL by sticking the MySQL
data files on a ramdisk (google for it, there are some articles out there
explaining how to do this).

Also, you can try running tests that don't actually have a dependency on
the rails environment without it, perhaps by sticking them in different
folders under test (i.e test/unit, test/db, ...)


On 5 December 2013 11:20, Mr Jaba <the.jaba at gmail.com> wrote:

> Hi Everyone,
>
> I've recently taken ownership of a new project with a large test suite
> (2000ish tests), and the overall run time is around 30 minutes which is
> certainly less than ideal!
>
> Now I know the general approach to "Fast Rails Tests" but taking the time
> to refactor the whole test suite is a bit too much right now. I'm wondering
> if anyone has experience of transforming a test suite of this magnitude to
> something a bit speedier? If so how did you go about it? What tips, tricks
> and techniques can you share?
>
> A bit more info:
>
> - Test::Unit tests, moving to Minitest
> - Rails 3.2.16
> - Running parallel_tests shaved 5 mins off the time
> - Using Spring to reduce Rails load time.
>
> Any advice gratefully received!
>
> Tom
>
> _______________________________________________
> Chat mailing list
> Chat at lists.lrug.org
> http://lists.lrug.org/listinfo.cgi/chat-lrug.org
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lrug.org/pipermail/chat-lrug.org/attachments/20131205/0cee37f6/attachment.html>


More information about the Chat mailing list