This topic describes the use of the Diff Tool to compare two
project items, such as test modules or data sets, or revisions of a given project
At times, it can be helpful to compare the contents of two similar text-based project items.
You may, for instance, have two revisions of a test module that were edited by different people,
or two variations of an interface entity. Arranging the two items on screen side-by-side and
doing an eyeball examination can help when the files are small and the differences few. But for
anything more involved, trying to understand all the differences this way can be tedious and
The Diff Tool
makes the job of difference viewing more systematic,
reliable, and efficient. It can be used to perform comparisons between the following types of
- The Diff Tool supports the comparing of project items not just within
a project, but across projects and across repositories as well.
- For comparing pairs of test results, TestArchitect
offers a different tool. See Comparing test
The Diff Tool
dialog box consists of the following parts:
The Item panels
panel includes the following elements:
- Header: The header at the top of each Item panel displays
the name of that item.
- The item's name is a hyperlink. Clicking this link opens the item in a TestArchitect editor window.
- Hover your mouse over the hyperlink to see a screentip for the item. The displayed
information includes the item's name, its TestArchitect
explorer path within the repository, and revision timestamp.
- Current location panel: Displays the currently selected line of the
- Display panel: Displays the text content of the item. Lines that are
different from their counterparts (or have no counterparts) in the comparison file are
highlighted. (See highlighting details below.) This panel is also the main area for visualizing
and navigating the differences between the two items.
Note: As you scroll an item up/down or
left/right using its scroll bars, the comparison item is scrolled in sync with it, so that the
two windows remain visually aligned. Also note that when you select a difference, it is always
selected in both Item panels.
TestArchitect highlights differences between two items with
colors. This section describes how each of the basic difference types is detected and
- Differences between lines:
- Missing lines: Sometimes, lines existing in one project item do not exist in the
compared item. Lines in an item that are found to have no counterparts are highlighted in
blue, with all the text in red. In the compared item, the corresponding blank lines are
colored grey; if no such corresponding blank lines exist, they are automatically inserted, to
maintain visual correspondence.
Interface entity comparisons
are a special case.
other project items, the order in which an interface entity's actions lines (interface
and interface entity setting
lines) appear is basically
inconsequential. Hence it is possible for two interface entities to look very different, yet be
functionally identical. In addition to the usual highlighting rules, the
automatically rearranges the two compared interface entities'
action lines, so that they ultimately appear in their respective Item
panels grouped into four distinct sections:
- Header: Contains interface entity and interface entity setting
- Missing: Contains action lines present in only one of the two interface entities.
- Differences: Contains action lines that the tool has determined to be corresponding
lines (due to similarities), but which nevertheless have differences, which are
- Identicalness: Contains fully matching action lines.
Working with multiple Diff Tool windows
A unique Diff Tool window is launched every time you
invoke the Diff Tool. Hence, it is possible to have multiple Diff
Tool windows open concurrently, each displaying a separate comparison.
Using drag-and-drop to update an open Diff Tool window
Say, for example, that you have a Diff Tool
window already open,
comparing a default user-defined action against a variation of itself. Now you would like to
compare another variation against one of the two items. From the TestArchitect explorer tree
tree, you can simply drag and drop the new
action's node into either the left or right panel of the window. The contents of the window
are automatically replaced with the new item, and the comparison is automatically
The compared items must be of same type. Otherwise, the following message