Ranorex Magic Merger makes it easy to auto-merge XML-based Ranorex files under source control and resolve manual conflicts on the fly.
It handles the following file types:
- Ranorex test suite files
.rxtst
- Ranorex repository files
.rxrep
- Project files
.csproj or .vbproj
When a repository is merged, this also affects the automatically generated code files (.cs or .vb
) associated with the repository. These files must be regenerated after the merge process for everything to work correctly. To do so, simply rebuild your solution in Ranorex Studio after the merge.
Magic Merger will display a message with instructions if automatically generated code files are affected.
Setting up Ranorex Magic Merger
Ranorex Magic Merger is designed to be integrated into your source control system as the default merging tool for the above-mentioned file types. The setup process is different for the three source control systems supported by Ranorex.
Git
When you open a solution that’s under Git source control or add one to Git, Ranorex Magic Merger will show a dialog to confirm that you want to use it as the default merging tool for the listed Ranorex file types. If you select Yes, everything will be set up automatically and you’re good to go. The dialog will be shown for each Git repository, meaning the merge tool is not set as default globally.
When you select Don’t use Ranorex Magic Merger and check Do not show again, Ranorex Magic Merger will not be used for any Git repositories except those that are already using it. The dialog will not appear again. Get it back by using the Restore ignored dialogs option in Settings.
SVN
You will need to manually set Ranorex Magic Merger as the default merging tool for the listed Ranorex file types in SVN. For TortoiseSVN, open its settings and go to External Programs > Merge Tools > Advanced and add all three Ranorex file types along with the following command line (change path if required): C:Program Files (x86)Ranorex 8.2BinRanorex.MagicMerger.exe -base:%base -mine:%mine -theirs:%theirs -output:%merged
TFVS
You will need to manually set Ranorex Magic Merger as the default merging tool for the listed Ranorex file type in TFVS. Follow this description and add all three Ranorex file types along with the following command line (change path if required): C:Program Files (x86)Ranorex 8.2BinRanorex.MagicMerger.exe -base:%3 -mine:%1 -theirs:%2 -output:%4
Local use
In some edge cases, you may want to use Magic Merger locally. You can do so by running the executable from the command line with the required parameters (change path if required): C:Program Files (x86)Ranorex 8.2BinRanorex.MagicMerger.exe -base: -mine: -theirs: -output:
The output file is generated automatically as a result of the merge process.
Merging
In the majority of cases, most of the merging will occur automatically, followed by a screen notifying you that the merge was completed successfully. However, as with all merging tools, sometimes user intervention will be required.
In this case, the manual merge screen will appear:
-
The type of conflict and a short explanation
-
Switch between Simple and Expert view. Expert view provides a more detailed tree structure.
-
Choose one of three layouts for the current view
-
The three sections represent the different file versions (Expert view only)
-
Select one of the tabs to view the hierarchy from this node onwards. The node containing the conflict is marked in blue.
-
Click to open the file in Ranorex Test Suite Runner
-
Resolution strategy selector
-
Number of conflicts resolved and pending. Note that the total number of conflicts may increase or decrease depending on the resolution strategy picked.
To resolve a conflict, simply take a look at the changes, choose your desired resolution strategy, and then click Continue. Once you’ve resolved all manual conflicts, a success message will appear and the merge is complete.