[rspec-users] Spec/Test Speed
Jerry West
jerry.west at ntlworld.com
Thu Oct 4 06:11:03 EDT 2007
In-memory with sqlite worked fine with rspec-0.8 (it's been a while
since I did this!). Google for instructions or drop me a line. Don't
forget autotest/zentest to run only those tests which have ben affected
by changes.
Rgds,
Jerry
Scott Taylor wrote:
> Just wanted to pick some smart people about this topic: What are you
> guys doing to increase the speed of your specs?
>
> I'm a big fan of autotest, but right now my current project has 438
> specs (for rails). Most of them are in the model, and for all of
> them we are hitting the database (they are more functional specs than
> unit-tests). The whole suite takes 112 seconds (meaning the red to
> green cycle leaves me learning how to juggle, just like Jim Weirich
> with make). Any recommendations, short of mocking/stubbing to get
> around this? Some of the suggestions I've heard are:
>
> - In Memory Database w/ Sqlite. As far as I know, no one has gotten
> this to work (with rspec, at least)
> - Using faster hardware. I don't have the budget right now for a
> better machine. One interesting idea is this one: http://
> www.dcmanges.com/blog/deep-test-preview, although as far as I know,
> it doesn't work for rspec.
> - Only running specs per file, and using continous integration to do
> the rest. Right now this isn't an option for testing my User model,
> which has 92 examples, and takes 20 seconds. Also, I'd really rather
> not commit before I know the whole test suite passes
> - Other ideas?
>
> Scott
>
> _______________________________________________
> rspec-users mailing list
> rspec-users at rubyforge.org
> http://rubyforge.org/mailman/listinfo/rspec-users
>
More information about the rspec-users
mailing list