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:
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:
- Double-click the filter on your route that you are testing.
- 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:
- On the Filter Testing dialog, select the Add Test button to display the Test Editor dialog.
Enter a Name and Description for the test.
- In the Input Messages tab, select the input message test mode in Mode:
- 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. - 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.
- If you need to use a single input test message, select
- In the Expected Output Messages tab, select the expected output message test mode in Mode:
- 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. - 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.
- If you expect a single output message, select
- 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:
- Click the Select link to select a message definition (clicking the Clear link clears the message definition).
- Add or edit the message properties in the Message Properties panel.
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 theRaw 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.- 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). - 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.
- Enter the message manually. Ensure you add
- 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:
- Add (or edit) the name and description of the message in the General panel.
- Click the Select link to select a message definition (clicking the Clear link clears the message definition).
- Add or edit the message properties in the Message Properties panel.
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 theRaw 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.- 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). - 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.
- Enter the message manually. Ensure you add
- 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:
- Check the Validate expected output result checkbox if you want your test result to be validated.
- Check the Expect test result to be an error checkbox if you want your test to pass when there is an error.
- Click the Select link to select a message definition (clicking the Clear link clears the message definition).
- Add or edit message properties in the Message Properties panel.
- Check the Ignore all message properties checkbox if you want the test to ignore message property validation.
- 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. 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 theRaw 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.- 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). - 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.
- Enter the message manually. Ensure you add
- 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:
- Add (or edit) the name and description of the message in the General panel.
- Click the Select link to select a message definition (clicking the Clear link clears the message definition).
- Check the Expect test result to be an error checkbox if you want your test to pass when there is an error.
- Add or edit message properties in the Message Properties panel.
- Check the Ignore all message properties checkbox if you want the test to ignore message property validation.
- 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. 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 theRaw 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.- 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). - 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.
- Enter the message manually. Ensure you add
- Select the OK button to save your changes, or the Cancel button to abort.
Modifying a Filter Test
To modify a filter test:
- 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.
Edit the Name and Description for the test as required.
- To edit an input message, select the Input Messages tab:
- If in single message test mode, refer to Input Message - Single Message Test Mode on how to edit an input message.
- If in message collection test mode, refer to Input Messages - Message Collection Test Mode on how to edit one or more input messages.
- To edit an input message, select the Expected Output Messages tab:
- If in single message test mode, refer to Expected Output Message - Single Message Mode on how to edit an expected output message.
- If in message collection test mode, refer to Expected Output Messages - Message Collection Mode on how to edit one or more expected output messages.
- Select the OK button to save your changes, or the Cancel button to abort.
Deleting Filter Tests
To delete a filter test:
- On the Filter Testing dialog, select the test you want to delete, and select the Remove Test button.
- Select the Yes button when prompted to confirm the deletion.