Using Subversion with Ranorex projects

Feb 29, 2012 | Best Practices

Using Subversion with Ranorex projects

In general, it’s a good idea to use some kind of revision control system to keep track of the progression of your automated test projects – that way you can revert to a previous version if you run into trouble.

Additionally using such a version control system is almost essential if you are working as a team on the same test automation project.

Therefore we recommend to use a source versioning system like SVN (which integrates in Ranorex Studio), having the advantages of

  • making the history of all changes made to your project visible
  • providing backup functionality
  • preventing security issues on network shares (source code checked out locally)

to name some of them.

The following paragraphs will explain how to

Before starting with the Ranorex specific part of this blog post I would recommend to have a look at the book Version Control with Subversion to get a complete overview about version control (and learn things such as how to set up a SVN server).

Setting up Ranorex for a better Subversion experience

Before performing all the subversion specific update/commit stuff, you should adjust the subversion settings.

To do so open the Tools Options dialog and check the option “Automatically add new files” in Subversion Options area

Check "Automatically add new files"

and uncheck the option “Automatically copy/move log files to the project reports directory” in Ranorex Log Viewer area.

Uncheck "Automatically copy/move log files to the project reports directory"

In the Subversion Options area at the Tools Options dialog you can also choose the SVN version you are using (1.6 or 1.7).

Checking out a repository to your local drive

Please note that it’s necessary to have access to a SVN-Server and a repository located on this SVN-Server to perform the following steps. Therefore please have a look at the book Version Control with Subversion or contact your system administrator. If you do not want to host your own SVN-Server you can also use a free source code hosting service as listed at this wikipedia article. It’s also possible to create your own repository without the use of a SVN-Server. This can be done using e.g. TortoiseSVN; for a step-by-step description see this blog post.

After making sure that you have  access to the repository for your Ranorex test solutions, first of all you have to check out the repository to a local folder (called “working copy”) on your hard drive to put your solutions into it.

Open the Subversion Checkout dialog…

… and check out your repository to a local directory

Commit a project to your repository

After doing so, generate a new solution into the working copy directory you’ve just made a checkout to.

The generated files have automatically been added to your repository, since you have set the option “Automatically add new files” before.

Project View

To commit the changes to your repository simply right-click on your solution file and choose “Commit…” from the context menu.

Commit changes

Versioning models

The basic problem of sharing files is that changes made by one team member might be accidentally overwritten by another as sketched in following figure:

The modified version File’ of File is overwritten by the modified version File’’

To overcome this issue you can follow two different approaches:

The “Lock-Modify-Unlock”-approach:

Tester2 will not overwrite changes of Tester 1 as the file is locked

The “Copy-Modify-Merge”-approach:

Copy-Modify-Merge-1

Tester1 merges his changes with the changes of Tester2

The “Copy-Modify-Merge” approach is the default used by Subversion. As all checked in files are text based files there should be no problems with using the “Copy-Modify-Merge” method. Even the XML-files should be understandable easily. So, in case of a conflict you should be able to determine which differences to accept or to decline.

Merging Test Suite file

Of course you can also use the Lock-Modify-Unlock model, if you do not want to merge the files manually.

Locking Test Suite file

By following the mentioned steps and looking up unclear topics in the book Version Control with Subversion there should nothing stand in your way using version control with your Ranorex projects.

Related Posts:

3 Essential Aspects of a Test Automation Tool

3 Essential Aspects of a Test Automation Tool

  Transitioning into test automation is a wise move for any organization, making it key to choose the right test automation tool for the job. Here, we'll cover how to compare and evaluate a test automation tool like Ranorex. A software test automation tool can...

The Future of Mobile Apps with Ranorex and React Native

The Future of Mobile Apps with Ranorex and React Native

It’s hard to overstate the impact of mobile apps on our daily lives. Smartphones are used for everything from tracking workouts to scheduling important meetings. React Native is a true game-changer in this landscape. Previously, developers had to build apps capable of...

Alpha Testing vs Beta Testing: A Comparative Analysis

Alpha Testing vs Beta Testing: A Comparative Analysis

In software development and engineering, testing plays a pivotal role in ensuring the final product is up to standard. The two most prominent testing stages are alpha and beta testing. To understand these crucial stages, it's necessary to learn about the significance...