QTP: VBScript error handling vs. Recovery Scenarios

I have been recently tasked by my tech lead with two things while progressing with building our test suite in QTP. These are:

1) Begin to try and use a more “tool-based” rather than a “progammer-based” response to challenges in QTP.

2) Sort of how to best make use to recovery scenarios in QTP.

I agreed, of course (since these are associated with my merit raise goals), and so far, it's driven me nuts. Seems QTP never wants to do things the way I want it to. It has done some very cool things when combining regular expressions with descriptive programming for me, but I'd still rather get at the object I want via the XMLDOM and do whatever I want that way. Every time the tool tries to abstract you from something complex, some amount of fine control is lost. Ah, well, I'll keep plugging away at it.

For the second item, I have been trying out the recovery scenarios in QTP. I can honestly say that they blow...and I mean goats...nickel a herd. This is one time when the tool based approach isn't terribly useful. I find the VBScript On Error/Goto 0 approach far more useful to catch and handle granular errors. I have also figured out that the recovery scenarios REALLY S-L-O-W down the test run. If you use more than a couple of them, you see a drastic degredation in run speed. We are just testing, after all, so one must ask if speed is important, but I mean it's siginificant enough that speed becomes an issue. There is one very handy function in recovery scenarios that I like, though: upon a trigger event firing, you can force the machine to reboot. Now, it won't restart the next test, but at least you can recover from a drastic crash. I suppose I could write something to start over after the reboot...hmmmm...

For this, I am afraid the programmatic approach is still better....have to get credit for the merit goals somewhere else.....

On a lighter note, the band has its first show this week...wish me luck!

posted @ Monday, June 26, 2006 8:12 AM

Print

Comments on this entry:

# re: QTP: VBScript error handling vs. Recovery Scenarios

Left by Jit at 7/24/2007 7:47 PM
Gravatar
I argee with you, however did you find some way how to handle errors like , when we click a tab or next button in a Web page and find 'page cannot be displayed' or '502 Bad Gateway' ?

One way is we can check whether the page is loaded currectly or not else its an error, but then we need to give 'if' everythere to check always...Do you have some good idea to handle this ? From yours above writting I can deduct that you have worked quite well with QTP :-)

# re: QTP: VBScript error handling vs. Recovery Scenarios

Left by Nawab at 8/13/2007 1:29 AM
Gravatar
Please let me know what are the advantage's of VBScript over Recovery Scenario's

# re: QTP: VBScript error handling vs. Recovery Scenarios

Left by amar at 10/28/2007 3:44 PM
Gravatar
hai please teelme i dont know about recovery scenario manager

# re: QTP: VBScript error handling vs. Recovery Scenarios

Left by Gany at 10/29/2007 6:26 AM
Gravatar
Hey Its quite Ineresting, Can u explain more about the topic. so that we too can mae use of it

# re: QTP: VBScript error handling vs. Recovery Scenarios

Left by kondalrao at 10/30/2007 5:08 AM
Gravatar
dfgdfgd

# re: QTP: VBScript error handling vs. Recovery Scenarios

Left by manoj at 11/6/2007 10:03 AM
Gravatar
Query #1. In QTP 9.2, how to identify the classname, if i have only object name or logical name as input..

Query #2. After executing the below step, the
set rep=createobject("Mercury.ObjectRepositoryUtil")
rep.load "F:\common.tsr" ..........

I am able to get the answer appropriately, but QTP is
showing some runtime error and quiting completely.

Microsoft Visual C++ Runtime Library File Error

R6065: pure virtual function call

# re: QTP: VBScript error handling vs. Recovery Scenarios

Left by manoj at 11/6/2007 10:04 AM
Gravatar
Query #1. In QTP 9.2, how to identify the classname, if i have only object name or logical name as input..

Query #2. After executing the below step, the
set rep=createobject("Mercury.ObjectRepositoryUtil")
rep.load "F:\common.tsr" ..........

I am able to get the answer appropriately, but QTP is
showing some runtime error and quiting completely.

Microsoft Visual C++ Runtime Library File Error

R6065: pure virtual function call

# re: QTP: VBScript error handling vs. Recovery Scenarios

Left by manoj at 11/15/2007 9:25 PM
Gravatar
Query #2. After executing the below step, the
set rep=createobject("Mercury.ObjectRepositoryUtil")
rep.load "F:\common.tsr" ..........

I am able to get the answer appropriately, but QTP is
showing some runtime error and quiting completely.

Microsoft Visual C++ Runtime Library File Error

R6065: pure virtual function call

# re: QTP: VBScript error handling vs. Recovery Scenarios

Left by ashoka at 11/24/2007 5:24 AM
Gravatar
HI PLEASE SEND IMPORTENT VB SCRIPT FOR USING QTP

# provide me some scripting examples in qtp

Left by Shriyans bajaj at 12/10/2007 4:29 AM
Gravatar
scripting in qtp

# re: QTP: VBScript error handling vs. if condition

Left by srikanth at 12/21/2007 2:37 AM
Gravatar
script

# re: QTP: VBScript error handling vs. Recovery Scenarios

Left by E.Prasad naidu at 1/10/2008 8:36 AM
Gravatar
I want to know the disadvatage of vb script over the recovery scenorios

# re: QTP: VBScript error handling vs. Recovery Scenarios

Left by nidhi at 3/12/2008 5:47 AM
Gravatar
plz let me know that how much vb script knowldge is required for qtp i know qtp i used a bit but still not confident can any body tell me avt it i m very much familar with vb6.0

# QTP: VBScript error handling vs. Recovery Scenarios

Left by hello at 4/7/2008 3:21 AM
Gravatar
no knowledge...just the basic knowledge of loops and stuff...
Comments have been closed on this topic.
«December»
SunMonTueWedThuFriSat
30123456
78910111213
14151617181920
21222324252627
28293031123
45678910