Recovery operation in QTP -Tutorials and Examples

Recovery operation in QTP

The recovery operation  screen enables to specify the operation(s) Quick test performs after it detects the trigger event, it can consist of a mouse/keyboard event, close application, call a recovery function defined in library file or restart windows.

Types of recovery operations in QTP

recovery operation in QTP-Keyboard or mouse operation

Keyboard or mouse operation:

Quick test simulates a click on a button in a window or presses of a keyboard key, i.e. Click Cancel button/Press the ESCAPE key.

Close application process:

It will close the application when the trigger event occurs

Function call:

Quick test calls a VBScript function to handle the exception occurred during run time.

Restart Microsoft Windows:

It will restart the windows when the trigger event occurs.

Post Recovery Operation in qtp

Post-recovery test run specifies a way to continue the check run once has known the event and performed all of the desired recovery operations

Quick Test can perform one of the following test run options after it performs the recovery operations that are defined:

  • Repeat current step and continue
  • Proceed to next step
  • Proceed to next action iteration
  • Proceed to next iteration
  • Restart current test run
  • Stop the test run

recovery operation in QTP-Repeat current step and continue

Name and Description Screen: Examples

In the Name and Description screen, specify a name by which to identify the particular recovery scenario created, information regarding the scenario can also be added, Enter a name and a textual description for the recovery scenario, and click on Next to continue to the finishing the recovery Scenario Wizard screen.

recovery operation in QTP-Recovery description

Completing the recovery scenario wizard

In completing the recovery scenario wizard dialog, a summary of the scenario settings that defined can be reviewed, Specify whether to automatically associate the recovery scenario with the current test, and/or to add it to the default settings for all new tests.

Select the Add scenario to the current test checkbox to associate this recovery scenario with the current test, when clicked finish, Quick Test adds the recovery scenario to the scenario’s list in the recovery tab of the test settings dialog box of qtp.

Select the Add scenario to default settings check box to do this recovery scenario a default scenario for all new tests, the next time a test is created, this scenario will be listed in the scenario’s list in the recovery tab of the test settings dialog box

Click on Finish button to absolute the recovery scenario definition

recovery operation in QTP-Complete wizard

How to save recovery scenario in a recovery File

After a recovery scenario is created or modified in a recovery file using the recovery scenario wizard, it is necessary to save the recovery file

To save a new or modified Recovery File

  • Click the save button, if scenario’s are added or modified in an existing recovery file, the recovery file and it’s scenario’s are saved, if a new recovery file is used, save a attachment dialog opens.
  • Choose the folder in which the file wants to be saved
  • Type a name for the file in the file name box and save, recovery file is saved in the specified location within the file extension .qrs

Enabling and disabling Recovery Scenario’s

  • Specific scenario files can be enabled or disabled and determine when quick test activates the recovery scenario mechanism, to enable/disable specific recovery scenario’s

Select the check box to the left of 1 or a lot of individual scenario’s to disable them

To define when recovery mechanism is activated

Select one of the following options in Activate recovery scenario’s box

Always: the recovery mechanism is activated after every step

On Error: recovery mechanism is activated only  an error throws during test run.

Never: recovery mechanism is always disabled

Tags: qtp recovery scenario function call example, how to add recovery scenario in qtp at run time, recovery scenarios in qtp interview questions, how to associate recovery scenario in qtp, qtp recovery scenario not triggered,recovery scenario in selenium,recovery scenario file extension,error handling in qtp,Effective way of Executing Recovery Scenarios,Error Handling and Recovery Scenarios in QTP,How to handle the exceptions using recovery scenario manager in QTP,All about Recovery Scenarios using QTP,How to use Recovery Scenario in QTP to deal with unexpected errors,When to use a Recovery Scenario.

Article Name
Recovery operation in QTP -Tutorials and Examples
What is recovery operation in qtp? The recovery operation screen enables to specify the operation(s) Quick test performs after it detects the trigger event.
Publisher Name
Publisher Logo

Leave a Reply

Your email address will not be published. Required fields are marked *