Corporate Info | News | Solutions | Products | Partners | Services | Events | Download | How To Buy
eLink Information Integrator Doc Home | eLink Information Integrator User Guide | Previous Topic | Next Topic | Contents | Index

Using the Tester

The Information Integrator Tester utility allows you to parse and reformat messages as a validation test. Using the Tester utility, you can make sure the message formats you built using the Formatter or MsgDefAdmin tool produce the expected results. For more information on the Formatter tool, refer to Building Format Definitions. For more information on the MsgDefAdmin tool, refer to Using MsgDefAdmin.

This chapter discusses the following topics:

- Starting the Tester

- Parsing and Reformatting Messages Using the Tester

Starting the Tester

You can launch Tester using the steps described in the following procedure.

1. Double-click the Tester icon. The Tester Logon dialog box appears as in Figure 5-1.

   Note: If you do not have an assigned user ID and password, ask your system administrator to create them for you.

   Figure 5-1 Tester Logon

2. Enter your user ID in the User ID field and press Tab.

3. Enter your password in the Password field and press Tab.

4. Select a database type from the Database drop-down list box. The database field appears or disappears based on your selection.

   - If you selected the Microsoft SQL server type, specify the server in the Server field and the database in the Database field.

   - If you selected an Oracle database type, specify the server in the Server field.

5. Click OK. The Tester main window appears as in Figure 5-2.

   Figure 5-2 Tester Main Window

This dialog contains the parameters for parsing Formatter messages. The parameters are described in Table 5-1 below:

Table 5-1 Tester Dialog Parameters

####

Parameter | Description
--- | ---
Filename | The name of the file that contains the messages to test. You can enter the file name directly into the field or click Browse to select from a list of files.
Browse | Displays the Open dialog, where you can select the file that contains the messages to test. The file name you select is copied to the File Name field when the Open dialog is closed.
Message | The message to test. You can enter the message directly into the Message text area or click Read to extract the message from the file specified in the File Name field.
Read | Extracts the message from the file name specified in the File Name field and displays the extracted message in the Message text area. This button is disabled until you enter a file name in the File Name field.
Input Format | Specifies the input format to use for parsing the message. The available values depend on the formats specified in the Formatter database.
Output Format | Specifies the output format to use for reformatting the message. The available values depend on the formats specified in the Formatter database.
Parse | Parses the message displayed in the input Message text area and displays the parsed message in the output Message text area. The output is divided into three columns: Field, Data Type, and Value.
Reformat | Parses and reformats the input message. The reformatted message is displayed in the output Message text area.
Show Debug | Displays details of the parsing or reformatting in the output Message text area.
Close | Closes this dialog.

Parsing and Reformatting Messages Using the Tester

You can parse and reformat messages using the Tester by following the steps below.

1. Choose one of the following options:

   - Specify the name of the file that contains the message you want to test in the File Name field, or click Browse to view a list of files.

     If you click Browse, select the file that contains the message you want to parse in the Select File dialog. The file name is automatically copied to the File Name field when the Select File dialog is closed.

     Once a file is specified in the File Name field, the Read button is enabled. Click Read to extract the message from the file specified in the File Name field. The message appears in the Message field.

   - Enter the message to test in the Message field. If you are parsing and reformatting binary data, you can use the following escape characters: \a, \n, \r, \t, and \xFF.

2. Select the input format for parsing from the drop-down list box in the Input Format group.

3. Click Parse to parse the message. The results are displayed in the Message field to the left of the Input Format group. If you want to view the details of the parse, select the Show Debug checkbox before clicking Parse.

4. Select the output format for reformatting from the drop-down list box in the Output Format group.

5. Click Reformat to reformat the message. The results are displayed in the Message field to the left of the Output Format group. If you want to view the details of the reformat, select the Show Debug checkbox before clicking Reformat.

Example

This section outlines the procedure required to complete Step 5 in Using Information Integrator. In Step 5, you use the Tester utility to test the message formats you built in Step 3 (Step 3. Create the Message Format Descriptions) and Step 4 (Step 4. Create Output Operations). By testing message formats using the Tester utility, you can identify and correct errors in your formats before using them to parse you actual data.

In the steps that follow, we will load the input data in the Tester utility and test the formats.

1. Start the Tester utility.

2. Click Browse and open the file \sample\payroll\payroll.data. This file contains the input data for the sample application. It is provided on the installation CD-ROM, and is located in the \sample\payroll sub-directory under the directory where you installed Information Integrator.

3. Click Read. The file is read into the Tester and appears in the Message text area (see Figure 5-3).

   Figure 5-3 Tester window showing input data

4. From the Input Format drop down list, select II_payroll_msg1_I. This is the input format that was created when you processed the file II_payroll_msg1.xml using MsgDefAdmin (see Step 3. Create the Message Format Descriptions for more information).

5. Click Parse. The parsed message displays in the Message text area (see Figure 5-4).

   Figure 5-4 Parsed message

6. From the Output Format drop down list, select II_payroll_msg2_O. This is the output format that was created when you processed the file II_payroll_msg2.xml using MsgDefAdmin (see Step 3. Create the Message Format Descriptions for more information).

7. Click Reformat. The reformatted message displays in the Message text area (see Figure 5-5).

   Figure 5-5 Reformatted message

Copyright © 2000 BEA Systems, Inc. All rights reserved. Required browser: Netscape 4.0 or higher, or Microsoft Internet Explorer 4.0 or higher.