Why don’t testers version control their tests?
I am still surprised at how many organizations don’t version control their automated test scripts. I put it down to the following reasons:
- Developers may use expensive version control tools, but sometimes there aren’t enough licenses for testers;
- People don’t realize there are free version control tools available;
- Setting up version control might be considered too difficult for the test team;
- Some people believe you need to own a version control server to version your test scripts; or
- Any combination of the above.
- If the software developers’ version control system is available for testers great, but if not, test scripts can be versioned separately;
- There are many different free version control tools available. TortoiseSVN, which uses the Subversion (SVN) protocol, is very popular and very easy to use;
- Setting up a new SVN repository using TortoiseSVN only takes a few minutes; and
- You can set up a SVN repository on a shared network drive, so you don’t need a server (but a server is cool).
How to quickly set up a new SVN respository on a shared network drive (using Windows)
If you haven’t version controlled your test scripts yet, here’s how to do so.
- Download and install TortoiseSVN from http://tortoisesvn.tigris.org/ (it’s about 19MB, and requires a reboot: bummer :( )
- Find a location on a shared network drive where you can store your SVN repository. For example, it could be
Q:\SVN Repositories, create a new directory for your repository (eg.
Q:\SVN Repositories\WatirMelon\and right click within this new directory in Windows Explorer, and choose TortoiseSVN, and then ‘create repository here’. The path to your new directory will be your SVN repository path.
- The repository should be created in a matter of seconds, and filled with some directories and files. These files/directories should never be touched, under any circumstances.
- Now you need to create a local repository and check out the new repository (which will be blank initially). Create a directory on your local drive for your repository, for example
C:\watirmelon, and right click within this directory and choose ‘SVN Checkout’.
- You will need to specify the location of your repository you created in Step 2, but importantly you will need to add file:/// to the front, and change the backslashes into forward slashes.
- Once you click OK you have a repository (albeit blank) checked out. You would then simply add all your automated test scripts, then do an ‘SVN Add’, and ‘SVN commit’. If you want to use your automated tests on another machine, you simply checkout the repository following steps 4 & 5 above.
So there it is. Now there’s really no excuse not to version control your automated tests, considering it’s free, quick, easy and doesn’t require a server. So go and do it now (if you haven’t already).