You can create new tests, and edit or delete existing tests for filters using the Filter Testing dialog:

The Filter Testing dialog displays the following information:

Field Description
Name The user-defined name of the test.
Description The user-defined description of the test.
Result

The cumulative test result for the test:

  • None (blank field) - the test has not yet been run.
  • Passed - the test has been executed, and all expected output messages match their corresponding actual output messages.
  • Failed - the test has been executed, and at least one expected output message does not match its corresponding actual output message.
  • Executed - the test has been executed, but not validated. The test has run, with no fatal errors occurring.
  • Error - fatal errors have occurred while running the test.
  • Skipped - the test has been skipped, usually because no input messages have been selected when in testing in collection mode.
  • Invalid - the filter does not support filter testing (for example, the Duplicate Message Detection and Hold Queue filters), or its configuration cannot be tested (for example a database filter connecting to a non-standard database using user-provided database drivers).

You can open the Filter Test Results dialog by clicking on the result. Refer to Reviewing Filter Test Results for details.

You can perform the following actions from the Filter Testing dialog:

Action Description
Add Test Add a new test.
Edit Test Edit a test.
Remove Test Delete a test.
Copy Copy the entire test.
Paste Paste the entire test.
Run Test Run a single test you have selected.
Run Checked Tests

Run the tests you have checked.

Select All Select all tests by checking their checkboxes.
Deselect All Deselect all tests by unchecking their checkboxes.
Timeout Set the maximum time in seconds allowed for running the tests.
Logging Level Set the level of logging events to capture.

When you modify or add tests, the associated route is automatically checked out.

Viewing Filter Tests

To view tests added to a filter:

  1. Double-click the filter on your route that you are testing.
  2. On the Configuration tab of the filter's Properties dialog, click the Test Filter Configuration link to display the Filter Testing dialog.

If filter testing is not supported by your engine, or if you do not have the 'Test filter configurations' access right, then the Test Filter Configuration link is not displayed.

Adding a Filter Test

To add a test to a filter:

  1. On the Filter Testing dialog, select the Add Test button to display the Test Editor dialog.
  2. Enter a Name and Description for the test. 

  3. In the Input Messages tab, select the input message test mode in Mode:
    1. If you need to use a single input test message, select Single Message. Refer to Input Message - Single Message Test Mode on how to add a single input test message.
    2. If you need to use multiple input test messages, select Message Collection. Refer to Input Messages - Message Collection Test Mode on how to add multiple input test messages.
  4. In the Expected Output Messages tab, select the expected output message test mode in Mode:
    1. If you expect a single output message, select Single Message. Refer to Expected Output Message - Single Message Mode on how to add a single expected output message.
    2. If you expect multiple output messages, select Message Collection. Refer to Expected Output Messages - Message Collection Mode on how to add multiple expected output messages.
  5. Select the OK button to add the test to the Filter Testing dialog, or the Cancel button to abort.

Alternatively, you can copy-paste an existing test to a filter from any filter or Intelligent Mapper mapping project by using the right-click menu.

Input Message - Single Message Test Mode

In single message test mode, the Input Messages tab appears as follows:

 To add or edit a single test message, enter the following information in the Input Messages tab:

  1. Click the Select link to select a message definition (clicking the Clear link clears the message definition).
  2. Add or edit the message properties in the Message Properties panel.
  3. Select the message body parameters for your test message:

    Parameters Descriptions
    Mode The display mode of the message. The Show Whitespace mode uses Java escape characters to represent non-printable characters, whereas the Raw Hex mode enables you to edit directly the hexadecimal characters that make up the binary message. You can switch between the two modes at any time.
    Encoding

    The character encoding of the message. If Unknown/Not Set is selected, then no encoding is stamped on the message when it is sent to the filter for testing.

  4. Select the Encoding for your test message (Unknown/Not Set means no encoding is stamped on the message when it is sent to the filter for testing).
  5. Add your message using one of the following methods:
    • Enter the message manually. Ensure you add \r\n (or \r or \n) to the end of every segment in the message.
    • Click the Load Message link to load a message from a file.
  6. Select the OK button to save your changes, or the Cancel button to abort.

Input Messages - Message Collection Test Mode

In message collection test mode, the Input Messages tab appears as follows:

The Input Messages tab provides the following information for each input test message:

 Field Description 
Name The user-defined name for the test message.
Definition The message definition used by the test message.
Description The user-defined description of the test message.

You can perform the following actions from the Input Messages tab:

Action Description
Add

Add a test message using the Edit Input Message dialog.

Alternatively, you can copy-paste an existing input test message from any filter or mapping project test in message collection test mode by using the right-click menu.

Edit Edit a selected test message using the Edit Input Message dialog.
Remove Delete a selected test message.
Move Down Prioritize the order in which the test messages are sent by demoting a selected test message.
Move Up Prioritize the order in which the test messages are sent by promoting a selected test message.
Select All Select all test messages.
Deselect All Deselect all test messages.

Editing or Adding Input Messages

 For input messages, the Edit Input Message dialog appears as follows:

 

 To add or edit an input test message, enter the following information in the Edit Input Messages dialog:

  1. Add (or edit) the name and description of the message in the General panel.
  2. Click the Select link to select a message definition (clicking the Clear link clears the message definition).
  3. Add or edit the message properties in the Message Properties panel.
  4. Select the message body parameters for your test message:

    Parameters Descriptions
    Mode The display mode of the message. The Show Whitespace mode uses Java escape characters to represent non-printable characters, whereas the Raw Hex mode enables you to edit directly the hexadecimal characters that make up the binary message. You can switch between the two modes at any time.
    Encoding

    The character encoding of the message. If Unknown/Not Set is selected, then no encoding is stamped on the message when it is sent to the filter for testing.

  5. Select the Encoding for your test message (Unknown/Not Set means no encoding is stamped on the message when it is sent to the filter for testing).
  6. Add your message using one of the following methods:
    • Enter the message manually. Ensure you add \r\n (or \r or \n) to the end of every segment in the message.
    • Click the Load Message link to load a message from a file.
  7. Select the OK button to save your changes, or the Cancel button to abort.

Expected Output Message - Single Message Mode

In single message test mode, the Expected Output Messages tab appears as follows:

 

 To add or edit a single test message, enter the following information in the Expected Output Messages tab:

  1. Check the Validate expected output result checkbox if you want your test result to be validated.
  2. Check the Expect test result to be an error checkbox if you want your test to pass when there is an error.
  3. Click the Select link to select a message definition (clicking the Clear link clears the message definition).
  4. Add or edit message properties in the Message Properties panel.
  5. Check the Ignore all message properties checkbox if you want the test to ignore message property validation.
  6. Add or edit the HL7 message path to ignore in the Ignore Paths panel, for example MSH.10.1.1. Only the message paths that have been selected by checking their associated Ignore checkbox are ignored. 
  7. Select the message body parameters for your test message:

    Parameters Descriptions
    Mode The display mode of the message. The Show Whitespace mode uses Java escape characters to represent non-printable characters, whereas the Raw Hex mode enables you to edit directly the hexadecimal characters that make up the binary message. You can switch between the two modes at any time.
    Encoding

    The character encoding of the message. If Unknown/Not Set is selected, then no encoding is stamped on the message when it is sent to the filter for testing.

  8. Select the Encoding for your test message (Unknown/Not Set means no encoding is stamped on the message when it is sent to the filter for testing).
  9. Add your message using one of the following methods:
    • Enter the message manually. Ensure you add \r\n (or \r or \n) to the end of every segment in the message.
    • Click the Load Message link to load a message from a file.
  10. Select the OK button to save your changes, or the Cancel button to abort.

Expected Output Messages - Message Collection Mode

In message collection test mode, the Expected Output Messages tab appears as follows:

The Expected Output Messages tab provides the following information for each input test message:

 Field Description 
Name The user-defined name for the test message.
Definition The message definition used by the test message.
Description The user-defined description of the test message.

You can perform the following actions from the Expected Output Messages tab:

Action Description
Add

Add a test message using the Edit Expected Output Message dialog.

Edit Edit a selected test message using the Edit Expected Output Message dialog.
Remove Delete a selected test message.
Move Down Prioritize the order in which the test messages are sent by demoting a selected test message.
Move Up Prioritize the order in which the test messages are sent by promoting a selected test message.

Validate Expected Output Result

Select whether your test results should be validated.
Select All Select all test messages.
Deselect All Deselect all test messages.

Editing or Adding Expected Output Messages

For expected output messages, the Edit Expected Output Message dialog appears as follows:

 

To add or edit an expected output message, enter the following information in the Edit Expected Output Messages dialog:

  1. Add (or edit) the name and description of the message in the General panel.
  2. Click the Select link to select a message definition (clicking the Clear link clears the message definition).
  3. Check the Expect test result to be an error checkbox if you want your test to pass when there is an error.
  4. Add or edit message properties in the Message Properties panel.
  5. Check the Ignore all message properties checkbox if you want the test to ignore message property validation.
  6. Add or edit the HL7 message path to ignore in the Ignore Paths panel, for example MSH.10.1.1. Only the message paths that have been selected by checking their associated Ignore checkbox are ignored.
  7. Select the message body parameters for your test message:

    Parameters Descriptions
    Mode The display mode of the message. The Show Whitespace mode uses Java escape characters to represent non-printable characters, whereas the Raw Hex mode enables you to edit directly the hexadecimal characters that make up the binary message. You can switch between the two modes at any time.
    Encoding

    The character encoding of the message. If Unknown/Not Set is selected, then no encoding is stamped on the message when it is sent to the filter for testing.

  8. Select the Encoding for your test message (Unknown/Not Set means no encoding is stamped on the message when it is sent to the filter for testing).
  9. Add your message using one of the following methods:
    • Enter the message manually. Ensure you add \r\n (or \r or \n) to the end of every segment in the message.
    • Click the Load Message link to load a message from a file.
  10. Select the OK button to save your changes, or the Cancel button to abort.

Modifying a Filter Test

To modify a filter test:

  1. On the Filter Testing dialog, double-click a test, or select a test, then click the Edit Test button to display the Test Editor dialog.
  2. Edit the Name and Description for the test as required.

  3. To edit an input message, select the Input Messages tab:
    1. If in single message test mode, refer to Input Message - Single Message Test Mode on how to edit an input message.
    2. If in message collection test mode, refer to Input Messages - Message Collection Test Mode on how to edit one or more input messages.
  4. To edit an input message, select the Expected Output Messages tab:
    1. If in single message test mode, refer to Expected Output Message - Single Message Mode on how to edit an expected output message.
    2. If in message collection test mode, refer to Expected Output Messages - Message Collection Mode on how to edit one or more expected output messages.
  5. Select the OK button to save your changes, or the Cancel button to abort.

Deleting Filter Tests

To delete a filter test:

  1. On the Filter Testing dialog, select the test you want to delete, and select the Remove Test button.
  2. Select the Yes button when prompted to confirm the deletion.