RubyFlow The Ruby and Rails community linklog

How to Speed up Your Tests without Touching the Code

I wanted to share an interesting discovery. If you’re using Capybara then you might be able to speed up your tests considerably (5 times in my case) by moving the database to tmpfs. I wrote an article showing how: https://www.gregnavis.com/articles/how-to-tune-your-database-to-make-tests-faster.html . The same technique should work in other frameworks (and languages) as long as you don’t wrap test cases in transactions to clean up after them.

Comments

JFYI: last dot in the article URL makes 404

@ARK SHRAIER: It is already fixed :)

Post a comment

You can use basic HTML markup (e.g. <a>) or Markdown.

As you are not logged in, you will be
directed via GitHub to signup or sign in