Test Design StudioGo to Previous Topic: Blocked FilesGo to Next Topic: Import and Export Settings

Compare Files


Test Design Studio includes an integrated file comparison utility. It allows you to quickly compare any two text-based files to determine the differences between those files.

Note:   Notice that syntax highlighting is visible for supported files even within the comparison utility.

Viewing Differences

The two files are displayed side-by-side where matching lines of the file are aligned. As you scroll through the document, both documents are kept in sync. The first file is typically the original document, and it is displayed on the left. The second file is the new file, and it is displayed on the right.
Visual ElementDescription
Red HighlightIndicates text that was deleted from the first file and is not present in the second file.
Green HighlightIndicates text that was either added to the second file and is not present in the first file or new text that was added to the second file.
The Compare Files toolbar is typically displayed automatically when a Compare Files window is opened. If it is not, you may display the toolbar by selecting View -> Toolbars -> Compare Files from the Main Menu. This toolbar exposes three commands:
RefreshUse this command to re-compare the file if one of the two files has changed since the original comparison.
Previous DifferenceMoves the view to the first file difference that occurs before the current location.
Next DifferenceMoves the view to the first file difference that occurs after the current location.

Specifying Files for Comparison

Test Design Studio offers a few different methods for invoking the Compare Files feature.

Browse For Second File

With any file opened in Test Design Studio, you can quickly compare that file to any other file. Locate the opened file within the Solution Explorer. Right-click the file node and select Compare -> Compare File... from the context menu. The Compare Text Files dialog will be displayed.

The first file is already specified for you based on the file the command was executed from. You may now click the ... button to browse for the second file. When both files have been specified, click the OK button to compare the files.

Designating a Base File

When multiple comparisons need to be made to the same file, you may use the base file method of comparison. This process involves marking a specific file as the base file, and then telling other files to compare themselves to the base file.

To mark a base file, locate the desired file in the Solution Explorer tool window. Right-click the file node and select Compare -> Mark as Base Compare File from the context menu. To compare another file to the base file, locate the second file in the Solution Explorer tool window, right-click the file node, and select Compare -> Compare To 'xxx' from the context menu. The file will then be compared to the base file and the results displayed.

Comparing Document Modifications

If any text-based file is opened in Test Design Studio and modified, you may compare the current text of the editor to either the original file or the version last saved to file. This can help you understand how a file has been modified since it was first opened. To perform either of these comparisons, right-click the document tab of the open editor and select Compare To Original or Compare To Last Save from the context menu.

Note:   If the document has not been modified since it was opened, these commands will not be displayed.

Working with Complex Files

Files such as Unified Functional Testing scripts are not as simple as a single text file and require more advanced handling for file comparisons. When one of these file types is loaded for comparison, the exact path to the file used for comparison is displayed at the top of the window. For instance, Unified Functional Testing scripts will typically compare the corresponding actions files.

When files of this type are loaded, there will be a > button displayed to the right of the file path at the top of the comparison window. Clicking this button will display alternative files that can be used for comparison as first or second file. Select any one of those files to update the comparison. The screen below shows the options available for a Unified Functional Testing script:

3rd-Party Comparison Utilities

While the built-in comparison tool provides the core functionality for comparing files, you may have a 3rd-party tool you would prefer to use for more extensive comparison support. You can define this tool using the Document Options.