ITPub博客

首页 > Linux操作系统 > Linux操作系统 > About Defining and Using Recovery Scenarios

About Defining and Using Recovery Scenarios

原创 Linux操作系统 作者:ipqiaojj 时间:2009-03-17 10:52:19 0 删除 编辑

About Defining and Using Recovery Scenarios

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:

  • 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 component 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 component QuickTest should continue, if at all. For example, you may want to restart a component from the beginning, or skip a step entirely and continue with the next step in the component.

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/,如需转载,请注明出处,否则将追究法律责任。

上一篇: 勇敢面对自己。
请登录后发表评论 登录
全部评论

注册时间:2009-02-22

  • 博文量
    140
  • 访问量
    75117