About Defining and Using Recovery Scenarios - WinRunner

Unexpected events, errors, and application crashes during a test run can disrupt your test and distort test results. This is a problem particularly when running batch tests unattended: the batch test is suspended until you perform the action needed to recover.

The Recovery Manager provides a wizard that guides you through the process of defining a recovery scenario: an unexpected event and the operation(s) necessary to recover the test run. For example, you can instruct WinRunner to detect a “Printer out of paper” message and recover the test run by clicking the OK button to close the message, and continue the test from the point at which the test was interrupted.
There are two types of recovery scenarios:

  • Simple: Enables you to define a (non-crash) exception event and the single operation that will terminate the event, so that the test can continue.
  • Compound: an exception or crash event and the operation(s) required to continue or restart the test and the associated applications.

A recovery scenario has two main components:

  • Exception Event: The event that interrupts your test run.
  • Recovery Operation(s): The operation(s) that terminate the interruption.

Compound recovery scenarios also include Post-Recovery Operation(s), which provide instructions on how WinRunner should proceed once the recovery operations have been performed, including any functions WinRunner should run before continuing, and from which point in the test or batch WinRunner should continue, if at all. For example, you may need to run a function that reopens certain applications and sets them to the proper state, and then restart the test that was interrupted from the beginning.

The functions that you specify for recovery and post-recovery operations can come from any regular compiled module, or they can come from the recovery compiled module. The recovery compiled module is a special compiled module that is always loaded when WinRunner opens so that the functions it contains can be accessed whenever WinRunner performs a recovery scenario.

To instruct WinRunner to perform a recovery scenario during a test run, you must activate it.

The following diagram summarizes the steps involved in creating a recovery scenario:

steps involved in creating a recovery scenario
Recovery scenarios apply only to Windows events. You can also define Web exceptions and handler functions. For more information, see “Handling Web Exceptions.”

All rights reserved © 2018 Wisdom IT Services India Pvt. Ltd DMCA.com Protection Status

WinRunner Topics