On completion of a test, you can review the result in the Filter Test Results dialog:

The Filter Test Results dialog displays information in the following tabs:

Tabs Description
Messages Displays the test results, including the test messages and any message errors.
Errors Displays any errors that occur while testing a filter's configuration.
Logs Displays any log entries generated by the filter after the test has completed.

Messages

The Messages tab enables you to compare the actual output messages resulting with the corresponding expected output messages for every input message in your test in message panels:

Message Panels Description
Input Message Displays the input test messages.
Expected Output Message

Displays the expected output messages.

Actual Output Message

Displays the actual output messages.

Test Result

Indicates the result of the test for each output message pair:

  • Passed - the test has been executed, and the expected output message matches the actual output message.
  • Failed - the test has been executed, and the expected output message does not match the actual output message, or fatal errors have occurred while running the test.

Each input message is displayed alongside its associated output message. If you have more than one input and/or output message, use the arrows to navigate between the messages results. If there are no output messages, the relevant panel header indicates this.

Message panels display the following information for input and output messages:

Panel Description
Message Properties Displays the message properties.
Message Body

Displays the message body based on the message mode and encoding selected.

The diff between an expected output message body and the actual output message body is highlighted as follows:

  • Red - highlighted in the expected output message body, indicating the data removed from the actual output message body.
  • Green - highlighted in the actual output message body, indicating the data added to the actual output message body.
  • Yellow - highlighted in both output message bodies, indicating the data modified in the messages.

Changes to whitespaces and trailing empty fields are ignored and not highlighted.

Test Result Information Displays information elaborating the test result (for output messages only).

Input Message

You can perform the following actions on input messages from the Input Message panel:

Action Description
Mode

Display messages in one of four message modes: 

  • Default Encoding.
  • Show Whitespace.
  • Raw Hex ( displays the hex and ASCII message side-by-side).
  • XML Formatted (only for XML messages).
Encoding  Set the encoding of message body.
Copy Message Copy the message body for pasting into a text editor or the Filter Test dialog, or the entire message as an imput or expected out message in message collection mode.

Expected Output Message

You can perform the following actions on expected output messages from the Expected Output Message panel:

Action Description
Mode

Display messages in one of four message modes: 

  • Default Encoding.
  • Show Whitespace.
  • Raw Hex (displays the hex and ASCII message side-by-side).
  • XML Formatted (only for XML messages).
Encoding Set the encoding of message body.
Save Message Save the output message to an EDI, XML or text file.
Copy Message Copy the message body for pasting into a text editor or the Filter Test dialog, or the entire message as an imput or expected out message in message collection mode.

Actual Output Message

You can perform the following actions on expected output messages from the Actual Output Message panel:

Action Description
Save Message

Save the output message to an EDI, XML or text file.

Set as Expected Set the actual output messages to the expected output messages (including the message body, message properties and message encoding) for the purposes of testing.
Copy Message Copy the message body for pasting into a text editor or the Filter Test dialog, or the entire message as an imput or expected out message in message collection mode.

Test Result Details

The test result is further elaborated upon as a series of message errors and warnings (if applicable) in the Test Result Details panels for expected output messages and actual output messages.

Message errors typically indicate that the actual output message does not match the expected output message. Message warnings indicate, for example, you have manually set the expected output result to expect message processing errors or to ignore message property validation.

You may encounter the following types of message errors:

Message Error Type Description

Unmatched Message Definitions

The actual output message definition does not match the expected output message definition.

Unmatched Message Properties

The actual output message properties do not match the expected output message properties.

Unmatched Message Encoding

The actual output message encoding does not match the expected output message encoding.
Unmatched Message Body The actual output message body does not match the expected output message body.

No Actual Output Message Present

An actual output message is expected, but none has been encountered.

No Expected Output Message Configured

No expected output message has been configured for comparison to the actual output message.

No Expected Errors

A fatal error is expected, but none has been encountered.

Unexpected Errors

A fatal error is not expected, but one has been encountered.
No Actual Output Message Produced

An actual output message could not be produced, for example due to a fatal error that has aborted processing.

You may encounter the following types of message warnings:

Message Warning Type Description
Expect Error The user expects the test to identify a fatal error when processing the message.
Ignore Properties The user has set message property validation to be ignored in the test.

Filter Testing Errors

The Errors tab displays any fatal errors (exceptions) that occur when testing the filter with test messages. 

The following types of errors can occur when testing a filter's configuration:

Error Type

Description

Configuration Error

Occurs if a filter is checked in when not configured correctly. The error indicates the configuration is inconsistent, and therefore the test could not be run.

Processing error

Occurs if the filter failed to process the message (FilterProcessingException). If the filter is part of a route, this would result in the message going to the Error connector and probably the Error Queue.

Processing error with additional information

A standard filter error (FilterProcessingException), with additional messages identifying the cause of the problem. For example, errors thrown by the Mapper filter to report mapping errors that caused a mapping to fail.

Timeout error

Occurs if the test takes longer than the configured timeout to run, and as a result the test has to be aborted.

The Show stack trace/Hide stack trace links enable you to toggle between displaying and hiding a stack trace of the error. By default, the stack trace is hidden. The Copy errors to clipboard link enables you to copy all the error information to the clipboard as text to make it easy to extract the errors, if required:

If no errors occurred while running the test, the Errors tab displays the message: No Errors Occurred.

Filter Testing Logs

Any log entries generated by the filter are displayed on the Logs tab after the test has completed. You can configure the logging level you want to use. Refer to Running Filter Tests for details.

Only log entries generated in the filter logging or a sub-logger are visible. If the filter calls other services within Rhapsody, which then do some logging, these will not be included, but are available in the main Rhapsody logs.

The empty space between the square brackets contains the name of the sub-logger if a child of the main filter logger (truncated to the last 20 characters) was used instead of the main logger.

If the log entry includes a stack trace, this is displayed immediately below the appropriate entry: