Ranorex Studio doesn’t automatically add new recordings and other files to the Subversion repository. It also generates report files that, because they don’t get into the Subversion repository, end up cluttering the project tree. These two problems are probably related and are easy to fix.
The Problem
When you create a recording, Ranorex adds the recording (a .rxrec file with two dependent .cs files) to your project but does not automatically add it to the Subversion repository. It’s too easy to forget to check those checkboxes in TortoiseSVN’s Commit dialog. This will break your build and your teammates will throw tomatoes at you because they won’t get all those fancy modules you recorded.
When you run a recording or a test case, Ranorex generates a log (a .rxlog file) and adds it to the project under the Reports folder. But, as with the recordings, it doesn’t add the log files to the Subversion repository. So your teammates get the same project tree that you see, except that all the reports you’ve generated are marked with a yellow exclamation mark. More tomatoes.
Why does this happen?
My guess is that this behavior is designed to make the logs visible and available and, at the same time, avoid adding all those transient logs that are generated during development to the Subversion repository. Other than cluttering up the project tree, they can also take up a lot of space.
The Ranorex Studio IDE is based on the open source SharpDevelop IDE and boasts the same excellent Subversion integration. Ranorex Studio changed the default Subversion integration settings to get this behavior.
In my experience, these settings are less than helpful. Most, if not all, of the reports that are generated during development can be thrown away as soon as the report tab is closed. You only use the report to see if your test run worked or to diagnose a problem if it didn’t. And if you work with Visual Studio and TFS, you’re accustomed to new files automatically being added to the project as well as to the TFS source control repository.
The Solution
Fixing this behavior is really easy. We only have to change two settings. Open up Ranorex Studio’s Options dialog and make the following changes.
Go to Tools > Subversion Options and check the “Automatically add new files” checkbox.
This will fix the first problem. Every file added to the project will now be committed by default, so all your teammates will get all the files and everybody will be happy. However, there is a side effect. This will also cause the generated log files to be added to the repository, which we want to avoid.
So go to Tools > Ranorex Log Viewer and uncheck the “Automatically copy log files to the project reports directory” checkbox.
This will cause Ranorex to save the reports to the output directory (e.g., bin\Debug). Since this is not part of the project, the Reports folder will not be created, the project tree will not get all cluttered up and the log files will not be added to the Subversion repository.
<
p>That’s it. No more tomatoes.
Noam,
Thank you for the blog. It is simple to understand and I believe that it will prove very useful once I am actively using Subversion in conjunction with Ranorex. One question: perhaps I have a newer version of Ranorex, but I noticed that “Ranorex Log Viewer” is now called “Ranorex Report Viewer” and the box you suggest that we uncheck now says, “Automatically copy/move report files to the project reports directory.” I definitely want to avoid having logs sent to Subversion, but I’m not sure if they are using the word “report files” interchangeably with “logs” or if that is something all together different. Do you know? I am new to Ranorex and don’t want to make a fatal error by leaving these report files out of Subversion if they are important.
Hey Angela,
They are one and the same.
About a year ago, it was called “log” in some places and, if I recall correctly, “report” in others. So Ranorex unified them at some point to make it more clear.
I have never seen a project in which it was important to save the report files in source control. However, I have seen projects where the reports (or some aggregation of results) was stored in a bug or task tracking system so the programmers and testers could review them after an automated test run. For example, they can be stored as attachments in TFS bugs.
My recommendation in most cases is to follow the steps outlined in this post to prevent adding unnecessary data to your source control database. And when you start running the tests automatically, make sure you can access the reports in one way or another. For example, you can use use Ranorex’s command line options to save the report files to a network share: http://www.ranorex.com/support/user-guide-20/lesson-4-ranorex-test-suite.html