Friday, March 11, 2011

All about QTP Recovery Scenarios

What is the purpose of using Recovery Scenarios?

In simple words, Recovery scenario is used to handle unexpected situations that might occur while the test is running like exceptions and Runtime Errors.

Recovery Scenario Manager provides a wizard that guides you through the process of defining a recovery scenario, which includes a definition of an unexpected event and the operations necessary to recover the run session. The Recovery Scenario Mechanism enables you to instruct Quickest to recover from unexpected events and errors that occur in your testing environment during a run session.

We can handle pop-up exceptions, Application crash exceptions and many more.Recovery Scenario is used only for unpredictable events or events that you cannot synchronize with a specific step in your component. Predictable events and errors can be handled with user defined functional and conditional statements but in case of unpredictable events we need to rely on Recovery Scenario.

A recovery scenario consists of the following:

Trigger Event: The event that interrupts your run session. For example, a window that may pop up on screen, or a QuickTest run error.

Recovery Operations: The operations to perform to enable QuickTest to continue running the test after the trigger event interrupts the run session. For example, clicking an OK button in a pop-up window, or restarting Microsoft Windows.

Post-Recovery Test Run Option: The instructions on how QuickTest should proceed after the recovery operations have been performed, and from which point in the test QuickTest should continue, if at all. For example, you may want to restart a test from the beginning, or skip a step entirely and continue with the next step in the test.

Recovery scenarios are saved in recovery scenario files. A recovery scenario file is a logical collection of recovery scenarios, grouped according to your own specific requirements.

Points to remember:
A recovery scenario must be first associated with the test to be invoked during thr run session.
You can associate multiple recovery scenarios with a test.
You can also control and activate your recovery scenarios during the run session by inserting Recovery statements into your test.

Screenshot of the Recovery scenario manager (Wizard) - Click on the image to enlarge it.

QTP Recovery Scenario
Recovery Scenario Wizard.

To be continued ...

No comments:

Post a Comment

Please leave your comment here...