How the exception handling can be done using QTP

Showing Answers 1 - 9 of 9 Answers

Vidya Sagar

  • Aug 6th, 2005
 

It can be done Using the Recovery Scenario Manager which provides a wizard that gudies you through the process of defining a recovery scenario. 
FYI.. The wizard could be accesed in QTP> Tools-> Recovery Scenario Manager ....... 

Kalpana Naidu

  • Sep 15th, 2005
 

Recovery scenario manager provides a wizard that guides you through the defining recovery scenario. Recovery scenario has three steps 
1. Triggered Events 
2. Recovery steps 
3. Post Recovery Test-Run 

Deepak

  • Aug 21st, 2006
 

Apart from recovery mgr what else can be done using QTP.

Suppose I have some scenarios which interact the real time scenario . will it be automated.

Plz give me some suggetions.

Deepak Kumar

  • Sep 30th, 2006
 

Another approach to the exception handling is to use the descriptive programming. This helps in gaining more visibility and making the application robust. Of course recovery manager is an alternative to most of the scenarios but not all.

Priyank Vyas

  • Apr 13th, 2007
 

QTP provides a good exception handling mechanism. In QTP 8.2 it is known as "Recovery Scnario Manager". It support 4 excptions 
(I)  pop up   (II) Object state (III) Test run error  (IV) Application crash

   I will give u one example that once we playback our recorded script and the AUT screen is minimized then a run time error will occured "eg. application is not visible or object is not visible". Than we make a handler for that.
 This time  " test run error" handler is used.
  - create a notepad file in hard disk
    c:exceptio.txt
  - give the path in library file
  - goto next
   -give scnario name
  -check  "add in current test " and "add to default scnario"
  -after doing this some code is pasted in your txt file
   now record script to restore window
  eg.  window("login").restore

   now that recorded script save into txt file and run the test.

If it not working then make sure  the scenario added into setting or not.
to enable that goto
Test->settings->recovery





montyjobs

  • Jun 18th, 2007
 

Frankly speaking exception handling in QTP is not good as compared to other
automation testing tool.

In QTP Exceptional handling is done by using

1. Recovery Scenarios.

2. Using “On Error” statement


In Recovery scenario you have to define.

1. Triggered Events.

2. Recovery steps.

3. Post Recovery Test-Run.


At Script Level you can use the On Error Resume Next and On Error Go to 0
statements.

Thanks

Manish Bhatla

bhaskar

  • Oct 12th, 2007
 

We can handle the exception handling in QTP by recovery scenario manager which is found in QTP-->Resources-->Recovery Scenario Manager

soumya

  • Aug 30th, 2011
 

If you use recovery scenario manager if u may not knowing the when error will occur. So better you can use on resume next method to use exception handling in qtp

  Was this answer useful?  Yes

Give your answer:

If you think the above answer is not correct, Please select a reason and add your answer below.

 

Related Answered Questions

 

Related Open Questions