Using the Event Tester

This chapter provides an overview of the Event Tester utility and discusses how to:

Click to jump to top of pageClick to jump to parent topicUnderstanding the Event Tester

The Event Tester allows you to test messaging events and subscription PeopleCode defined for rowset-based and nonrowset-based messages from within the PeopleSoft Pure Internet Architecture. You can test events and subscription PeopleCode without setting up a receiving database and server, without having pub/sub booted on your application server, and without impacting other developer activity on the system.

To use the Event Tester utility you should have a solid knowledge of Integration Broker messaging, as well as a knowledge of programming integration events and interpreting event results.

Note. Rowset-based messages are sometimes referred to as structured messages. Nonrowset-based messages are sometimes referred to as unstructured messages.

Note. The Event Tester does not function with messages formatted with multiple level 0 records.

Warning! When you use the Event Tester any PeopleCode associated with a message definition runs and production data is affected accordingly.

Click to jump to top of pageClick to jump to parent topicEvents to Test Using the Event Tester

You can test the following integration events using the Event Tester:

Click to jump to top of pageClick to jump to parent topicProcess Overview

To test integration events using the Event Tester:

  1. Select the message definition and version to use in the test.

  2. Select the event to test.

  3. Populate the message definition with data.

  4. Run the test.

In addition to providing procedures for each step in the process, this chapter also describes how to save message data, clone and delete record structures, override connector properties, and view test results.

Click to jump to top of pageClick to jump to parent topicCommon Elements Used in This Chapter

Message Name

The application message definition name to use for the test.

Version

The Event Tester populates the Version field with the default version of the message definition that is defined in the application database.

Click the dropdown list to select a different version to use in the test.

Event

Click the dropdown list to select an event to test. The list displays only those events currently defined for the selected message definition and version.

The options can include:

  • OnSend.

  • OnRequest.

  • OnRouteReceive.

  • OnRouteSend.

  • OnAckReceive.

  • Subscription PeopleCode.

Subscription

This field is enabled only when the event type you select in the Event field is Subscription PeopleCode.

Displays message subscriptions defined for the message definition.

Click the dropdown list to select the name of the subscription to test.

Use Existing Message

Click the button to use data from an existing message instance from the database.

User Provided XML

Click the button to input XML or upload XML data from a file.

New Tree Structure

Click the button to clear the record and field values in the tree structure.

Convert Tree to XML

Click the button to convert data stored in the tree structure into XML format.

IB Info Values

Click the link to override target connector properties.

Execute Event

Click the button to execute the selected event.

View Returned IB Info Values

Displays the IBInfo values that were returned from the test.

Returned Message/Result

The returned message or results from the test. Displays when you click the Execute Event button.

Click to jump to top of pageClick to jump to parent topicAccessing the Event Tester

This section discusses how access the PeopleSoft Pure Internet Architecture pages of the Event Tester.

Click to jump to top of pageClick to jump to parent topicPages Used to Test Integration Events

Page Name

Object Name

Navigation

Usage

Integration Broker Event Tester

IB_EVENTTESTER

PeopleTools, Integration Broker, Utilities, Event Tester

Use this page to:

  • Enter integration metadata.

  • Select the event to test.

  • Populate the message definition to use in the test with data.

  • Modify message data.

  • Run the test.

  • Clear message data.

  • Save message data.

  • View test results.

Message Keys

IB_EVENTTST6_SEC

Click the Use Existing Message button on the Integration Broker Event Tester page.

Populate a message definition with data in the application database.

Enter XML

IB_EVENTTST7_SEC

Click the User Provided XML button on the Integration Broker Event Tester page.

Manually enter XML data or import from a file.

IB Info

IB_EVENTTST4_SEC

Click the IB Info Values link on the Integration Broker Event Tester page.

Override target connector values.

Returned IB Info

IB_EVENTTST5_SEC

Click the View Returned IB Info Values link on the Integration Broker Event Tester page.

If you specify target connector properties, you can view returned IBInfo information.

Click to jump to top of pageClick to jump to parent topicSelecting Message Definitions and Message Definition Versions

This section discusses how to select a message definition to use for an event test.

Click to jump to top of pageClick to jump to parent topicSelecting Message Definitions

To select a message definition for the test:

  1. Access the Integration Broker Event Tester page.

  2. In the Message Name field, click the Lookup button and select a message definition.

    The Event Tester populates the Version field with the default version of the message definition that is defined in the application database.

  3. To select a different message version, in the Version field, click the Lookup button and select a message version.

When you select a rowset-based message, the structure of the message appears in tree-format at the bottom of the page. The records and fields contain no values until you populate the message with data.

When you select a nonrowset-based message, an Input Message text box displays. Use this box to populate the message definition with data.

Click to jump to top of pageClick to jump to parent topicSelecting Events to Test

To select an event to test:

  1. On the Integration Broker Event Tester page, from the Event dropdown list box, select an event.

    Only events defined on the message definition display in the dropdown list.

    If you select Subscription PeopleCode, the Subscription field becomes enabled.

  2. If you are testing a message subscription, from the Subscription dropdown list select the name of the message subscription to test.

Click to jump to top of pageClick to jump to parent topicPopulating Message Data

This section discusses the four ways to populate message data and how to save it.

Note. The Event Tester does not function with messages formatted with multiple level 0 records.

Note. If you select a multi-segmented message, only the first segment is retrieved.

Click to jump to top of pageClick to jump to parent topicUnderstanding Populating Message Data

You can load message data into a message definition from the following four sources.

  1. Message instance data from the application database.

  2. XML that you directly input into the utility.

  3. XML that you upload from a file.

  4. Field values that you manually enter into the utility.

Click to jump to top of pageClick to jump to parent topicUsing Message Instances Data from the Application Database

This section discusses how to use message data from message instances stored in the application database.

You can use this method to populate rowset-based and nonrowset-based message definitions.

To use data from a message instance:

  1. Access the Message Keys page.

  2. From the Message Type dropdown list select where the XML to use in the test is located. The options are:

  3. In the Publication Id field, enter the publication ID.

  4. In the Publishing Node field, enter the name of the sending node.

  5. (Optional.) In the Subscribing Node field, enter the name of the receiving node.

    This field is enabled only when the message type is Publication Contract.

  6. (Optional.) In the Subscription Name field, enter the name of the PeopleCode subscription program associated with the message instance.

    This field is enabled only when the message type is Subscription Contract.

  7. (Optional.) In the Segment Number field, enter the message segment number you are testing.

    This field is enabled only when the message type is Publication Contract or Subscription Contract.

  8. Click the OK button.

    The Integration Broker Event Tester page appears. The tree structure is populated with data from the message instance, publication contract or subscription contract that you selected.

Click to jump to top of pageClick to jump to parent topicManually Entering Field Value Data

After you specify a message definition and version for a rowset-based message, the Integration Broker Event Tester displays the message definition record and field structure in a tree format.

You can populate the message definition by manually entering values for fields.

To manually enter field value data:

  1. On the Integration Broker Event Tester page in the tree structure for the message definition, single-click on field name to populate.

    A dialog box for the field opens that displays field length and field type information as a guide for entering values.

  2. Enter a value for the field.

  3. Click the OK button.

Values you enter display after the field name in the tree view. The tree shows the first 30 characters of an entered value; however, the entire field value is stored.

See Also

Saving Test Data

Click to jump to top of pageClick to jump to parent topicManually Entering XML Data

This section describes how to:

Manually Entering XML Data into Rowset-Based Message Definitions

When you manually enter XML data into a rowset-based message, the tree view is not available. To work with message data in the tree view, you must populate the data using message instance data from the application database or manually populate field values.

To manually populate a rowset-based message definition:

  1. On the Integration Broker Event Tester page, click the User Provided XML button.

    The Enter XML page displays.

  2. In the XML text box enter XML to populate the message definition.

  3. Click the OK button.

    The Integration Broker Event Tester page appears and the XML you entered displays in the Input Message box.

Manually Entering XML Data into Nonrowset-Based Message Definitions

To manually populate a nonrowset-based message definition, on the Integration Broker Event Tester page, enter XML directly into the Input Message box.

Note that you can also click the User Provided XML button and enter XML in the XML text box for a nonrowset-based message definition.

Click to jump to top of pageClick to jump to parent topicUploading XML Data from Files

This section describes how to upload XML data from files to populate rowset-based and nonrowset-based message definitions.

Prerequisites for Uploading XML Data from Files

To successfully upload files into the Event Tester the following environment variables must be set:

Note. PS_SERVDIR is set when you run PSAdmin. Before running PSAdmin, set the PS_FILEDIR environment variable.

This section describes how to set the PS_FILEDIR variable in Windows and Unix environments.

To set the PS_FILEDIR variable in Windows:

  1. Close any open DOS windows.

  2. On your desktop, right-click the My Computer icon and click Properties.

    The System Properties dialog appears.

  3. Click the Advanced tab.

  4. In the Environment Variables section, click the Environment Variables button. The Environment Variables dialog box appears.

  5. In the User variables for <user name> section, click New.

    A New User Variable dialog box displays.

  6. In the Variable Name field enter PS_FILEDIR.

  7. In the Variable Value field, enter c:\<path>.

    The path you specify is the location from where the system will upload files.

  8. Click OK to exit the Environment Variables dialog box.

  9. Click OK again to exit the System Properties dialog box.

To set the PS_FILEDIR variable in Unix use one of the following commands as appropriate for your Unix environment:

The path you specify is the location from where the system will upload files.

Uploading XML Files

To upload XML data from a file to populate message definition data:

  1. Access the Enter XML page.

  2. Click the Upload XML from File button.

  3. Click the Browse button to locate the XML file to upload.

  4. Click the Upload button.

  5. Click the OK button to return to the Integration Broker Event Tester page to run the event.

See Also

Saving Test Data

Click to jump to top of pageClick to jump to parent topicSaving Test Data

This section discusses how to:

Click to jump to top of pageClick to jump to parent topicSaving Data Located in Tree Views

To save test data loaded or entered into a tree view:

  1. From the Integration Broker Event Tester page, click the Convert Tree to XML button.

    The Event Tester converts the data to XML format and displays it in the Input Message window.

  2. Cut and paste the XML into an editor or your choice and save the file.

You can later import the data back into the Event Tester by uploading the XML file back into the utility.

See Also

Uploading XML Data from Files

Click to jump to top of pageClick to jump to parent topicSaving Manually-Entered XML Data

To save XML test data that you have manually entered into the utility:

  1. From the Integration Broker Event Tester page, cut or copy the XML data in the Input Message box and copy it into an editor or your choice.

  2. Save the file.

You can later import the data back into the Event Tester by uploading the XML file back into the utility.

See Also

Uploading XML Data from Files

Click to jump to top of pageClick to jump to parent topicCloning and Deleting Record Structures

This section discusses how to:

Click to jump to top of pageClick to jump to parent topicCloning Record Structures

In some cases, you will want to add additional nodes to a record/field tree structure.

For example, if you are testing a purchase order, the records in the tree might be ORDER_HEADER and ORDER_LINE. If you want to test with two or more lines, you can click the first occurrence of the record name ORDER_LINE to duplicate that portion of the tree and all child records and nodes.

To clone a record structure:

  1. On the Integration Broker Event Tester page in the tree view, single-click the record to clone.

    The Select An Action dialog box appears.

  2. Select Clone Record Structure.

  3. Click the OK button.

The original record is duplicated, along with child nodes and all entered field values. If you clone a record in error, single-click the record again and delete the record structure.

Click to jump to top of pageClick to jump to parent topicDeleting Record Structures

To delete a record structure:

  1. On the Integration Broker Event Tester page in the tree view, single-click the record to delete.

  2. Select Delete Record Structure.

  3. Click the OK button.

Click to jump to top of pageClick to jump to parent topicSpecifying Target Connectors and Target Connector Properties

This section discusses how to:

Click to jump to top of pageClick to jump to parent topicSpecifying Target Connectors

You can specify a target connector and target connector properties you have defined at the connector, node and transaction level when you run event tests.

To select a target connector:

  1. Access the IB Info page.

  2. In the Connector Property Defaults section, select the target connector. The options are:

  3. Click the Load Connector Properties button.

Properties you have defined display in the bottom portion of the page.

Click to jump to top of pageClick to jump to parent topicSpecifying Connector Properties

After you load the defined connector properties you can modify and add new values for testing purposes.

Connector properties you add or modify here do not override the properties you may have defined at the gateway, node or transaction levels. However, when you run an event test, the PeopleCode runs based on the values you define here and the Event Tester writes the results to the database—and all PeopleCode database changes are permanent.

You can modify and add values for the following items:

Connector Name

Specify the proper name of the target connector to invoke to send the message.

Connector Class Name

Specify the class name of the target connector to invoke.

Remote Framework URL

Specify the URL (as a string) to which to send a message. This value overrides the server URL.

Path Info

Specific to incoming HTTP requests. This is the path information extracted from the request.

Cookies

Specific to incoming HTTP requests. This is cookie string found when the request was received by the HTTP listening connector.

App Server Domain

Enter the name of the application server domain to use.

Synch Server Timeout

Specify the timeout period (in seconds) for a transaction at runtime. The default synchronous timeout period is 300 (five minutes).

Property Name/Value/Property Type

Add or modify connector property names, values and types.

Name/Value

Add or modify parameter names and values to send to the target system in the URL, if the external system can use query string parameters as input.

Click to jump to top of pageClick to jump to parent topicRunning Event Tests and Viewing Test Results

This section discusses how to:

Click to jump to top of pageClick to jump to parent topicExecuting Event Tests

After you have set up the integration metadata and selected the event to test, you can run the event test.

To run an event test, on the Event Tester page, click the Execute Event button.

Click to jump to top of pageClick to jump to parent topicViewing Test Results

The Event Tester returns test results on the Returned Message/Result section of the Integration Broker Event Tester page and in the Returned IB Info page.

Viewing Results in the Return Message/Results Section

The following table lists the results the Event Tester returns in the Return Message/Results section on the Integration Broker Event Tester page:

Event

Returns

Comments

OnSend

Input Message

The return value is the input message plus any changes made by the OnSend PeopleCode. The IBInfo section of the message is included to show any changes to connector parameters.

OnRequest

Message structure.

None.

OnRouteReceive

Boolean

The return values are:

  • True. Inbound message is accepted.

  • False. Inbound message is rejected.

OnRouteSend

Boolean or String

The return values are:

  • Outbound message target node list is accepted.

  • Outbound message target node list is rejected.

  • Outbound message sent to the following node(s) — <node_name>, <node_name>, <node_name>

OnAckReceive

Integer

The return values are:

  • The status of the message - Error

  • The status of the message - Done

  • The status of the message - Retry

Subscription

Boolean

The return values are:

  • Event completed normally.

  • Event exited with an Exit (1).

A reply message displays for the OnRequest and OnSend events. If the reply message is rowset-based, it displays in a tree format to the right of the Input Message section. If the returned message is nonrowset-based, a display-only edit box will display with its contents.

Viewing Results in the Returned IB Info Page

If you specified target connector properties, you can view returned IBInfo information. To do so, on the Integration Broker Event Tester page, click the View Returned IB Info Values link.

Depending on the input values for an event test and the PeopleCode content, some or all of the fields contain test data.

The fields on that display on this page are described earlier in this chapter.

See Specifying Target Connectors and Target Connector Properties.

Click to jump to top of pageClick to jump to parent topicClearing Test Data

This section describes how to:

Click to jump to top of pageClick to jump to parent topicClearing Rowset-Based Message Data

To clear rowset-based message data:

  1. Access the Integration Broker Event Tester page.

  2. Click the New Tree Structure button.

All values for the input message are cleared from the message definition, and you can repopulate it as desired.

Click to jump to top of pageClick to jump to parent topicClearing Nonrowset-Based Message Data

To clear nonrowset-based message data:

  1. Access the Integration Broker Event Tester page.

  2. In the Input Message box, delete the XML.

You can repopulate the message definition as desired.

Click to jump to top of pageClick to jump to parent topicClearing the Event Tester

To clear the Integration Broker Event Tester, including integration metadata, event information, connector overrides and so on, use either of the following methods: