Developer Happiness (2 of 5): Speed Up Your Tests

Seeing your tests pass is a great feeling. Waiting a long time for it—not so much. Faster tests mean a happier developer!

Use Parallel Tests

If you’re not using parallel tests by Michael Grosser, you’re wasting time. Setup is just a few simple steps. You’ll be glad you did.

Upgrade Ruby if Possible

Another way to speed up your tests is to upgrade your project to Ruby 1.9.2. Here’s my Rails on 1.9.1 in Production: Just do it post.

Test suite under Ruby 1.8.6: real 3m57.156s

Test suite under Ruby 1.9.1: real 2m42.533s

A 31% speedup is nothing to sneeze at! If you have the ability, go Ruby 1.9.2 for faster tests.

Get an SSD for Your Development Box

As I pointed out a few weeks ago, dropping an SSD in my Macbook Pro cut my test runs in half. It’s not cheap, but if you spend your day on your computer, it’s well worth it.


Subscribe to our RSS feed or follow us on Twitter for the rest of the developer happiness series.

photo credit: atomdocs