Diff Viewer¶
ecu.test can be used to easily compare two files that have the same specific ecu.test file format. Thus it is not necessary anymore to reconstruct changes on the textual basis of the XML format. Instead, differences can be analyzed conveniently in a user-friendly view, which resembles the ecu.test main program.
The following file formats are supported:
Packages (
.pkg)Projects (
.prj)Testbench configurations (
.tbc)Test configurations (
.tcf)Mapping files (
.xam)Constants definitions (
.gcd)Parameter definitions (
.ppd).
If two files of the same file format are selected, the context menu entry Compare elements appears. If it is chosen, a new window ecu.test Diff Viewer opens up that has the following structure:
The user interface has three parts: On the left there are two columns in which the selected elements contained in the respective files are displayed. In the right part the properties of the currently selected elements are displayed in a table.
Changes on elements that exist within the two files are represented by colors. Different types of changes are visualized by means of the following color pattern:
Color |
Explanation |
|---|---|
Light blue |
Element moved |
Yellow |
Element changed |
Green |
Element added |
Red |
Element deleted |
Violet |
Element moved and changed |
Light yellow |
Element has changes in its sub-elements |
Yellow text |
Not all attributes of this element are supported. Element may be changed. |
If an elements gets selected, the corresponding element (if existing) in the other file will be selected automatically and a black frame is drawn around both elements. Changes of elements can be seen in the table on the right side. In the given example the variable VALUE is selected. In the table on the right side all properties of the element that were changed are marked in yellow. In this case the initial value was changed from 0 to 1.
Settings and navigation¶
Icon |
Shortcut |
Aktion |
|---|---|---|
F5 |
Reloads the files in the diff view. |
|
Tab |
Swaps the two columns on the left that display the elements of both files. |
|
Ctrl + |
Expands all elements in the two columns on the left. |
|
Ctrl - |
Collapse all elements in the two columns on the left. |
|
Draw gray placeholders where an element is deleted, added in the other file or moved. |
||
Reduces the view of a package to the relevant parts of a Spec-Package. |
||
Expands only the current difference while navigating with “Go to next/previous difference”. |
||
Ctrl + ↓ |
Go to the next difference in the columns on the left. |
|
Ctrl + ↑ |
Go to the last difference in the columns on the left. |
|
Ctrl + T |
Opens the textual Diff in TortoiseMerge. |
Limitations¶
The following elements are only partly supported and thus will always be displayed as “changed”:
Package - test case - certain teststeps:
AXS-Utilities
CANape-Script
Input dialog
HiL platform: RTT sequence administration
Inca HW access to units
User-Utilities
WinKFP flashing
Read reference
Write reference
Testconfiguration - Report
Info
Currently, when comparing files, only the selected program language of ecu.test is supported. This means, for example, that if in ecu.test as language English (U.S.) is set, changes to the german translation will not be recognized as a difference.
Integration in TortoiseGit and TortoiseSVN¶
By integrating the ecu.test Diff Viewer in a version control system (TortoiseGit or TortoiseSVN) a file can be compared with its previous revision or with the version before local changes were done. Therefore ecu.test has to be defined as external diff viewer in the version control. In the settings of the Version control system this setting can be done easily for the supported file formats by clicking the relevant button. If the supported file formats shall be compared with the text comparison tool integrated in TortoiseSVN, then the button Text comparison has to be clicked to reset the setting. In this case the previously created registry entry will be removed.
Info
If a new program version of ecu.test was installed, the entry in TortoiseSVN also has to be updated to the new installation directory. This can be easily done by clicking the button Text comparison and after that again the button ecu.test. Now the entry in TortoiseSVN is newly created containing the current program path.
If you right-click a file that is under version control in the windows explorer or in the package explorer in ecu.test there is a context sub menu TortoiseSVN, TortoiseGit, respectively Versions control system. You can find the entry Diff with previous version that compares the currently saved file containing possibly existing local changes (right window) with its previous revision (left window). If there are local changes the context menu additionally contains the entry Diff to compare the local file revision (right window) with its last updated file revision (left window).
Command line interface¶
The command line interface of the Package-Diff is defined as follows:
ecu.test.exe --diff <FileOld> <FileNew>
Parameter |
Meaning |
|---|---|
<FileOld> |
Path to the old version of the file |
<FileNew> |
Path to the new version of the file |









