3.21 Dealing with errors in tests: 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 3.14.2.

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 3.21.2.
a reentry type
to define how the test should continue once the Event Handler has been executed 3.21.3.



Subsections

Copyright BREDEX GmbH 2012. Made available under the Eclipse Public License v1.0.