3.27.1. Introduction to Event Handlers
Prev | 3.27. Dealing with errors in tests: Event Handlers | Next

### 3.27.1. Introduction to Event Handlers

Event Handlers are Test Cases used to deal with deviations during test execution. When an error occurs, the current Test Case is searched for an Event Handler for that error type. If none is found, the parent Test Case is searched, and so on. If no Event Handler for the test is found, then a default Event Handler is activated. Default Event Handlers are specified in the Test Suite properties (Section 3.16.2, “Configuring Test Suites in the Properties View”).

The advantage of adding your own Event Handlers is that you can define specific behavior for certain errors in each Test Case. An Event Handler can be an empty Test Case, or can contain Test Cases to be executed when the error occurs.

For each Event Handler, you must specify:

an event type

  to define what sort of error should activate this Test Case (Section 3.27.3, “Event types”).

a reentry type

  to define how the test should continue once the Event Handler has been executed (Section 3.27.4, “Reentry types”).