During the validation phase, you compare transformed messages with another set of messages you already know are valid (expected message set). The highlighted differences will indicate any issues in your code or any missing transformations. This is a quick and easy way to validate that your code fulfills the requirements.
Create a new Message Comparison Validation Rule
- Run the action containing the task validation will be added to.
This educates the application about what would be returned and would simplify the process.
- Select the task
- Select the Validation tab on the right.
- Provide the expected message count
- Select the Message Comparison tab
As the task executed once, the Last Result section is now populated.
- Move the mouse over the Expected Message section
- Right-click and paste the message expected. More than one message can be added. During test execution, message received will be compared with this/those message(s).
For a more detailed view of a message pair or message differences, double-click the message pair you want to compare. Navigate through the tree view, field by field, to see the differences.
Click on the gray zone at the bottom of the screen to view more details about each difference. Double-clicking on a grid row helps you navigate through the differences.
Include/Exclude Fields from comparison
You may want to exclude fields from the comparison so they are simply not considered in the comparison. This allows you to ignore differences in fields you don’t need to consider.
To exclude fields from comparison:
- Move your mouse pointer over the field you want to exclude
- Right-click and select Add to Exclude Filters
Alternatively, you can:
- Click the Change Filters icon ( icon on the upper-right corner)
- Make sure Exclude is selected
- Click Add…
- Change the new line that appears to the field to be excluded
- Repeat step #4 and #5 to exclude more fields
It can be easier to provide a list of fields to include instead of excluding a large number of fields. The procedure is similar. In the Filter tab, be sure Include (instead of Exclude) is selected.
To set a large number of fields in one operation, use the 1-on-1 message comparison screen. For example, if you want to compare fields PID.2 to PID.13:
- Go to the 1-on-1 message comparison by double-clicking on a message pair
- Expand the PID segment so you can view all fields
- Select PID.2 to PID.13 holding down the SHIFT key
- Right-click on the selection zone and select Switch to Include Filter and Set Only This Field
- Close the window
The comparison will refresh using the new field set.
Hide/Show what matters
After the comparison is completed, message pairs can have one of the following statuses:
- Changed: Matching message found and one or more differences were found
- Unmatched: No matching message found
- Identical: Matching message found and no differences was found
On the bottom left of the screen, the message pair count for each status is listed.
Message pairs can be shown/hidden based on their status. For instance, to hide identical messages:
- On the bottom left of the screen, select the identical message status
- Select Hide identical messages
Identical messages are filtered so only changed and unmatched messages are listed.