5.4.1 Structuring global Event Handlers for your test

When automated tests are running, it is important to ensure that an error in the test will not result in the rest of the test not running. To do this, we recommend adding general Event Handlers to each use case, at the very top level of the use case.

The aim of adding Event Handlers here is:

  1. To catch and deal with errors that are not known or expected during the test. For known/expected errors, Event Handlers can be used locally on individual Test Cases 5.4.2.
  2. To ensure that the rest of the test can continue - either in this use case, or in the next one.

A prerequisite for using Event Handlers in a global way is the structure of your tests. Each use case must be contained in a single Test Case , and the use cases must be independent from each other - starting in a well-defined state and leaving the AUT in a well-defined state 5.1.3.

The following steps describe how to set up a global error handling concept in your tests. They assume that you have set up a category structure as described earlier 5.3.1.



Subsections

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