Sun HL7 Message Library User's Guide

Using the Message Library Tester

The Message Library Tester allows you to simulate the operation of a Collaboration containing a specific Message Library, thereby checking the correctness of the library during the design phase. You can enter input data values, perform the unmarshal and marshal operations, and also manipulate the tree structure as a Collaboration might do by using the Add Instance and Delete Instance functions. By using these latter features, you can prepare an output data file that can then be used as an input data file for testing purposes.


Note –

For selected Message Libraries, the Verbose option provides a trace of parsing actions during the unmarshal process to aid in debugging the library structure. Selecting the Verbose check box causes parsing information to appear on the Verbose panel. The format and content of the data display are library-specific.


ProcedureTo use the Message Library Tester

  1. Open a Message Library in the editor.

  2. From the Message Library Editor toolbar, click Run Test.

    This saves the currently displayed Message Library to the Repository and displays the Message Library Tester at the bottom of the Message Library Editor. The data display panel offers four different data display modes. The Input mode is selected by default.

  3. You can provide the input test data either by clicking the Open File icon and selecting a data file, or by copying and pasting the data to the Message Library Tester data panel.

  4. Perform any of the following test:

ProcedureTo Test Unmarshal Functionality

  1. Click the desired unmarshal command to unmarshal the data from the Input panel to the OTD tree.

    The unmarshal options are:

    • Unmarshal

    • Unmarshal from Bytes

    • Unmarshal from String

  2. To verify the unmarshal process, check the values of each element for correctness.

  3. Save your input test data to a file for reuse by selecting the Input panel and clicking the Save icon.

  4. If there are errors in your input data, the Status panel appears, displaying the appropriate error messages. Confirmation of correct operation is also reported.

ProcedureTo Test Data Marshal Functionality

  1. From the Message Library Tester, enter or change data values for each node in the Value column of the node table.

    Use the Add/Delete Instance (+/-) buttons to add or remove instances where needed.

  2. In the Input View Encoding field, select the output character encoding.

  3. Click the desired marshal button to marshal (serialize) the data.

    The output is displayed in the Output panel

    The marshal options are:

    • Marshal

    • Marshal to Bytes

    • Marshal to String