Skip to Main Content
Return to Navigation

Testing Event Handlers and Events

This section provides an overview of event testing and discusses how to:

Pages Used to Test Event Handlers and Events

Page Name

Definition Name

Navigation

Usage

Event Manager - Test an Event Handler

EOEN_HNDLR_TEST

select Enterprise Components, then select Events & Notifications, then select Event Framework, then select Handler Tester

Execute a single event handler as a standalone process without raising an event. Use this feature for testing and debugging event handlers.

Event Manager - Raise an Ad-Hoc Test Event

EOEN_EVENT_TEST

select Enterprise Components, then select Events & Notifications, then select Event Framework, then select Event Tester

Raise a selected business event that you have defined on an ad hoc basis without invoking the business process that normally raises the event. This enables you to test events without having to perform the business operation that normally raises the event.

Execute a single event handler as a standalone process without raising an event. Use this feature for testing and debugging event handlers.

Understanding Event Testing

Generally in a production environment, you raise events by making a change to application data through a component or by running a PeopleTools Application Engine process. When the event is raised, the Event Manager framework executes the event handlers registered with the event as defined in the Event Registry component. When testing events, you should begin at the lowest level, which is the event handler, and then work your way up to the highest level, which is the business process that raises the event. Thus, to test events:

  1. Test the event handler in standalone mode through the Handler Tester component.

  2. Test the event independent of the business process that raises the event through the Event Tester component.

  3. Test the event in the context of the business process by executing the business process that raises the event through the component or PeopleTools Application Engine process.

Event Manager - Test an Event Handler Page

Use the Event Manager - Test an Event Handler page (EOEN_HNDLR_TEST) to execute a single event handler as a standalone process without raising an event.

Use this feature for testing and debugging event handlers.

Image: Event Manager - Test an Event Handler page

This example illustrates the fields and controls on the Event Manager - Test an Event Handler page. You can find definitions for the fields and controls later on this page.

Event Manager - Test an Event Handler page

Registered Handlers

This group box displays the event handlers that you have registered with the selected event in the Event Registry component.

Handler Exceptions

Use this group box to view results of the event handler execution. The system displays event keys, exceptions, and trace information that is associated with the execution of the event handler.

Event Fields

Use this group box to enter values for each of the fields that are part of the selected event and record. These are the values that the system passes into the event handler during the test. The system does not perform any validation on the data that you enter in the Value fields. Be sure to enter the correct format for data values and use uppercase or lowercase values for character data as appropriate. The system makes this data available to the event handlers as the Context Record for the Event.

Event Manager - Raise an Ad-Hoc Test Event Page

Use the Event Manager - Raise an Ad-Hoc Test Event page (EOEN_EVENT_TEST) to raise a selected business event that you have defined on an ad hoc basis without invoking the business process that normally raises the event.

This enables you to test events without having to perform the business operation that normally raises the event.Execute a single event handler as a standalone process without raising an event. Use this feature for testing and debugging event handlers.

Image: Event Manager - Raise an Ad-Hoc Test Event page

This example illustrates the fields and controls on the Event Manager - Raise an Ad-Hoc Test Event page. You can find definitions for the fields and controls later on this page.

Event Manager - Raise an Ad-Hoc Test Event page

Registry Info

Use this group box to view select information from the Event Registry component about the selected event and its registered handlers. The system displays this group box only if you select an event and click the Event Info button. To change any of this data, you must access the Event Registry component for the selected event.

Event Fields

Use this group box to enter values for each of the event fields that are part of the event that you are raising. The system does not perform any validation on the data that you enter in the Value fields. Be sure to enter the correct format for data values and use uppercase or lowercase values for character data as appropriate. The system makes these field values available to the event handlers as the context record for the event.