You are on page 1of 2

Recovery Scenarios:

During the execution QTP may face some problematic situation where in it needs to
recover by itself and continue the execution. To do the same a test engineer would have defined a
solution well in advance and made it available to the currant test before starting the execution.
QTP may face four types of problematic situations
1.Problems related to pop-up window
2.Problems related to object state
3.Problems related to test execution
4.Problems related to application crash

To define the solution for the above problems QTP has provided four trigger events
1.Pop up window
2.Object state
3.Test run error
4.Application crash

Navigation for object test:


 Activate the menu item tools
 Select the option recovery scenario manager
 Click on new scenario button
 Click on next
 Select the trigger event as object state
 Click on next
 Clixk on next
 Click on the hand icon
 Click on the desired object in the AUT
 Click on ok
 Click on next
 Specify the desired properties with the help of add/remove button
 Click on next
 Once again click on next
 Select the recovery operation as function call
 Click on next
 Browse the desired library file
 Select the option define new function
 Specify the desired function name
 Write the body of the function
 Click on next
 Deselect the check box add another recovery operation
 Click on next
 Specify the desired scenario name
 Click on next
 Select the desired check boxes
o Add scenario to the currant test
o Ass scenario to default test settings
 Click on finish
 Click on save
 Browse the desired location and save the file by specifying a file
name with .QRS extension
 Click on close
Environment Variables:
The variables that may be varied in different environments and need to be used
in the multiple scripts, should not be directly used in the scripts. They need to be declare separately in
an environment file that file need to be associated to the test and then the variables in that file need to
be used in those test so that when ever the values need to be updated in different environments one
can update them very easily in the environment

So all the tests using those variables will be automatically updated such kind of
variables separately declared in the environment file are known as environment variables
There are two types of environment variables
1.Built in variables
2.User defined variables

1.Built in variables:
These variables will be by default available with all the tests so that on can
directly use them in any test with the following syntax

SYNTAX: environment.value(“built invariable name”)


Example: var = environment.value(“05”)
Msg box var

You might also like