08-28-2009, 06:12 PM
Basanth,
Thanks for your response. Part of the problem I had was that when QTP would hang, the results file would get lost so I never really new exactly where it was hanging. I created a trace funtion which I called periodically throughout the code.
After tracing the code through several runs I noticed the following:
1. failure would occur at different locations, but not consistantly.
2. failures always orrcurred when invoking a function on a web element, such as 'click' or 'rowCount'.
3. Although QTP would invoke my recovery function at the failure point, it usually doesn't restart my application (an attribute of my recovery function).
I don't think it is a memory issue. I am using 2 identical laptops, except one has 1 Gb and the other has 2 Gb - I have more problems with the 2 Gb laptop failing.
Therfore, I am guessing that this is a race condition problem with the browser. That would explain the insconsistancy in failure locations, but with the consistancy that it always fails on a webelement function. It might even explain why the 2 Gb machine fails more - better QTP performance may have more frquent contentions with the browser.
I added a few wait statments at the most common failure locations and the script runs much better now. I hate adding wait statements - its programming for the worst case and still isn't full proof. I have struggled with synchroniztion between QTP and my Web app. I don't know if there are issues with web apps that use '.net'.
Thanks,
George
Thanks for your response. Part of the problem I had was that when QTP would hang, the results file would get lost so I never really new exactly where it was hanging. I created a trace funtion which I called periodically throughout the code.
After tracing the code through several runs I noticed the following:
1. failure would occur at different locations, but not consistantly.
2. failures always orrcurred when invoking a function on a web element, such as 'click' or 'rowCount'.
3. Although QTP would invoke my recovery function at the failure point, it usually doesn't restart my application (an attribute of my recovery function).
I don't think it is a memory issue. I am using 2 identical laptops, except one has 1 Gb and the other has 2 Gb - I have more problems with the 2 Gb laptop failing.
Therfore, I am guessing that this is a race condition problem with the browser. That would explain the insconsistancy in failure locations, but with the consistancy that it always fails on a webelement function. It might even explain why the 2 Gb machine fails more - better QTP performance may have more frquent contentions with the browser.
I added a few wait statments at the most common failure locations and the script runs much better now. I hate adding wait statements - its programming for the worst case and still isn't full proof. I have struggled with synchroniztion between QTP and my Web app. I don't know if there are issues with web apps that use '.net'.
Thanks,
George