3.27.2. Adding Event Handlers to a Test Case
Prev | 3.27. Dealing with errors in tests: Event Handlers | Next

### 3.27.2. Adding Event Handlers to a Test Case

This section deals with adding Event Handlers to Test Cases.

1. Open the Test Case Editor by double-clicking on the Test Case you want to edit in the Test Case Browser.

2. Select

   Add-->Test Case as Event Handler

   from the context-sensitive menu in the editor or use »CTRL+ENTER«.

3. Choose a Test Case to add from the dialog that appears.

   | You can also drag the Test Case you want to use straight into the Event Handlers area of at the bottom of th the Test Case Editor.

   | You can’t add a Test Case to itself as an Event Handler, because this would create an infinite loop.

4. You can optionally add a name for the Event Handler that will be used as the referenced name for this Event Handler.

5. Select an event type from the combo box (Section 3.27.3, “Event types”).

6. Select a reentry type from the combo box (Section 3.27.4, “Reentry types”).

   | For each Test Case you can only add one Event Handler for each event type.

7. Click ”OK”.

8. The Event Handler appears in the lower half of the Test Case Editor.

9. Save the changes in the editor.