Message Comparison

Definition

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

  1. 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.
  2. Select the task
  3. Select the Validation tab on the right.
  4. Provide the expected message count
  5. Select the Message Comparison tab
    As the task executed once, the Last Result section is now populated.
  6. Move the mouse over the Expected Message section
  7. 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).

 

1-on-1 Comparison

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:

  1. Move your mouse pointer over the field you want to exclude
  2. Right-click and select Add to Exclude Filters

 Alternatively, you can:

  1. Click the Change Filters icon (FilterEmpty icon on the upper-right corner)
  2. Make sure Exclude is selected
  3. Click Add…
  4. Change the new line that appears to the field to be excluded
  5. 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:

  1. Go to the 1-on-1 message comparison by double-clicking on a message pair
  2. Expand the PID segment so you can view all fields
  3. Select PID.2 to PID.13 holding down the SHIFT key
  4. Right-click on the selection zone and select Switch to Include Filter and Set Only This Field
  5. 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:

  1. On the bottom left of the screen, select the identical message status
  2. Select Hide identical messages

 

Identical messages are filtered so only changed and unmatched messages are listed. 

 

Next