3.18.1 Adding Event Handlers to a Test Case

This section deals with adding Event Handlers to Test Cases . For information on using Event Handlers meaningfully to ensure that your test execution is as robust as possible, see the section on Event Handlers in the Best Practices section 5.4.

  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«.

    \includegraphics[height=2cm]{lightbulb} 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 .

  3. Choose a Test Case to add from the dialog that appears.
    \includegraphics[height=2cm]{lightbulb} You can't add a Test Case to itself as an Event Handler , because this would create an infinite loop.
  4. Select an event type from the combo box 3.18.2.
  5. Select a reentry type from the combo box 3.18.3.
    \includegraphics[height=2cm]{lightbulb} For each Test Case you can only add one Event Handler for each event type.
  6. Click "OK".
  7. The Event Handler appears in the lower half of the Test Case Editor .
    Image EventHandler  Event Handler

  8. Save the changes in the editor.



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