Professional Documents
Culture Documents
4 Recovery Scenarios
4 Recovery Scenarios
*** When you want to recover from any problem, First, face the problem manually, Find the solution
manually , Recover from that problem manually.
And in the same way you implement for Automation ( in QTP)
------------------------------------------------------
Open a new test , Type Function () , you will get
Function
End Function
Modify the above code as below
Function popup_recovery()
End Function
------ Copy it and open a new NotePad and past it .
Save it with .vbs (VBSctipt ) Extention as library file -------
Run the Test which will Pass the results of course with Warnings ( may ignore it)
=================================================================
Recovery Scenario with Object State
( When the object is disabled )
------------------------------------------------------
Open a new test , Type Function () , you will get
Function
End Function
Modify the above code as below
Function popup_recovery()
End Function
------ Copy it and open a new NotePad and past it .
Save it with .vbs (VBSctipt ) Extention as library file -------
Run the Test which will Pass the results of course with Warnings ( may ignore it)
=================================================================
Recovery Scenario with Test Run Error
During execution one step may not execute properly , QTP will ignore it run next step on words .
For that we just need to call an empty function ().
After some time Version 2.0 is released with some changes V2.0
1. Open the version 2.0 application
2. Use the *same generated script only Chennai
But when u run this program, Delhi
It execute fist city name (Chennai)
When it comes to second city name (Hyderabad)
Test will Stops and FAIL.
Though its missed , in order to continue the execution from next step onwards
We just call an empty function which is stored in a library file
3. Keep the cursor where the city name seems to be missed
4. Activate tool menu item Tools
5. Open recovery scenario manager wizard
6. select trigger event as Test Run error
7. choose the error type from drop-down box as Item in list or menu not fund
8. Click NEXT
9. Click NEXT to specify the recovery operation
10. select operation type as Function call
11. Click NEXT
12. choose library file path where an empty function was stored
13. Click NEXT
14. De-select check box ( of add an other recovery scenario )
15. Click NEXT
16. Select post-recovery as Proceed to Next Step
17. Give name and description for this scenario
18. Click NEXT
19. Select add scenario to current test
20. click on Finish
21. Save it with .qrs extension
-: The End :-
Pls. leave your feed back (both +ve and –ve ) at kanakadria@yahoo.co.in