Unexpected events, errors, and application crashes during a run session can disrupt your run session and distort results. This is a problem particularly when components run unattended—the component pauses until you perform. the operation needed to recover. To handle situations such as these, QuickTest enables you to create recovery scenarios and associate them with specific components. Recovery scenarios activate specific recovery operations when trigger events occur. For information on when to use recovery scenarios, see Deciding When to Use Recovery Scenarios.
The 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. For example, you can instruct QuickTest to detect a Printer out of paper message and recover the run session by clicking the OK button to close the message and continue the component.
A recovery scenario consists of the following:
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.
To instruct QuickTest to perform. a recovery scenario during a run session, you must first associate the recovery scenario with that component (via its application area). A component can have any number of recovery scenarios associated with it. You can prioritize the scenarios associated with your component to ensure that trigger events are recognized and handled in the required order. For more information, see Defining Recovery Scenario Settings for Your Application Area.
When you run a component for which you have defined recovery scenarios and an error occurs, QuickTest looks for the defined trigger events that caused the error. If a trigger event has occurred, QuickTest performs the corresponding recovery and post-recovery operations.
You can also control and activate your recovery scenarios during the run session by inserting Recovery statements into your component. For more information, see Programmatically Controlling the Recovery Mechanism.
Note: If you choose On error in the Activate recovery scenarios box in the Recovery tab of the Application Area Settings dialog box, the recovery mechanism does not handle triggers that occur in the last step of a component. If you chose this option and need to recover from an unexpected event or error that may occur in the last step of a component, you can do this by adding an extra step to the end of your component.
来自 “ ITPUB博客 ” ，链接：http://blog.itpub.net/16792402/viewspace-569118/，如需转载，请注明出处，否则将追究法律责任。