As Ranorex projects only consist of text files, which facilitates merging and comparing changes within files, basically any kind of software configuration management (SCM) tool can be used with Ranorex. Regarding Team Foundation Server Ranorex has the advantage that its project format is the same as that of Visual Studio 2008.
Have a look at the “Source Control” section of our user guide.
The following is a walkthrough about how to keep Ranorex projects in TFS.
There are the following Team Foundation Server clients: the standalone Team Foundation Explorer and Visual Studio. I use Visual Studio 2010 in this blog.
In Visual Studio open the Team Explorer, right click, make a New Team Project and fill in the dialog that will pop up. I will add the Ranorex 3.0 samples to the new team project later.
After having made a new team project you will find Source Control underneath the new entry. Double-click on it to open the source control explorer. Instead of the Solution Explorer you can also use this view to work with TFS.
In Visual Studio make a blank solution by doing
- File / New / Project / Other Project Types / Visual Studio Solutions / Blank Solution
Then add Ranorex projects. I add the sample projects that come with Ranorex 3.0.
For example VIPTestSuite.csproj.
The Ranorex Project Format is still that of Visual Studio 2008. So there will be a conversion dialog. After conversion you will still be able to open it in Ranorex Studio 3.0.
You can add as many projects to the solution as you like. I have added four projects.
Right-click on the solution and choose Add Solution to Source Control … to add all projects to TFS.
The projects are added, but not yet checked in. You can right-click on the solution and choose Check In … from the context menu.
Or you can open the View / Other Windows / Pending Changes tool window.
Before you open and edit a project in Ranorex Studio you must check out the whole project. To do that right click on the project in the solution explorer and choose Check Out for Edit.
You can now make changes in Ranorex Studio. Check in using Visual Studio Solution Explorer or Source Control Explorer when you are done with them.
In Visual Studio you can look at the history of your changes.
Changesets will be listed in the history view.
Go to Changeset Details … to see individual files.
Compare with previous version to see the changes in a file.
Here is my change in the rxrec file.
This walkthrough showed how to use TFS with Ranorex Studio Projects. In a similar manner any other SCM tool can be used for Ranorex Studio projects:
- Add the project to SCM using an SCM specific client
- Before editing in Ranorex Studio, check out all files using the SCM specific client (or keep checked-out, i.e. writable, making this step unnecessary)
- Make changes to the Ranorex Studio projects
- Check in changes using the SCM specific client again