Protip: Clone large projects multiple times

Posted . Visible to the public.

Large projects usually have large test suites that can run for a long time.
This can be annoying as running tests blocks you from picking up the next story -- but it doesn't have to be that way!

Simply clone your project's repo twice (or even more often).

When your work on a feature branch is done, simply push that branch and check it out on your 2nd copy to run tests there.
You can pick up a new story and work on that on your "main" project directory.

If you do it right, you will even be able to run tests in both your 2nd copy and your main directory at the same time.

Here is what you'll need to do:

  1. Clone your project a 2nd time, into a new differently named directory. Example: git clone git@example.com:repo repo-copy (if your git server is slow you can also just copy the repository rsync -a repo/ repo-copy)
  2. Update your database.yml to use other test databases. Make sure you create those test databases.
  3. If there are further services (e.g. a Redis store), update your configuration for them, too (e.g. use a different Redis database ID).

Done.

Arne Hartherz
Last edit
Kim Klotz
License
Source code in this card is licensed under the MIT License.
Posted by Arne Hartherz to makandra dev (2015-07-09 08:58)