Quality Center and QTP Weirdness
I've often seen weird QTP behavior on my lab machines when I run long test sets from QC. This can be frustrating when you schedule normally-reliable tests at night, only to arrive the next morning to find that most of the later tests have failed.
These failures are usually unexplainable. Worse -- the problematic tests always end up passing when they're rerun.
Another issue I've observed is that the CPU on the lab machine shoots up due to the QTPro.exe sucking up all the memory.
Usually, a reboot resolves all these issues; however, it doesn't help if you need to run long test sets from Quality Center.
Possible workaround
While mucking around with the QTP Remote Agent settings recently, I noticed a Cleanup option called "Restart testing tool after x runs." (Everyone else may have already been aware of its existence, but it was news to me!) Anyway, this setting allows you to force QuickTest Pro to restart after x number of runs. So if you have a large test set that contains, say, 30 tests, you can test QTP restart after ten test runs.
How to change QTP Remote Agent settings
- Navigate to Start>Programs>HP QuickTest Professional>Tools>Remote Agent
- Right click on the QTP Remote Agent in the system tray and click on settings

- Under the Cleanup section change the 'Restart testing tools after" run setting

Does it work?
I've not yet tried it myself yet, but I'm hoping that using this setting will solve some of the funky QC issues I've seen. We'll see. I'll let you know if I find any interesting results.
Does anyone else use this setting, and does it work well for you? Let me know!

{ 10 comments… read them below or add one }
Buddy, this solution really works. I’ve to run more than 100 tests each day, and this solution solved my problem, wich was, the QTP stucked because of lack of memory.
Regards.
Anonymous » Cool – glad it helped you!
Hello Joe, My question is bit different from this topic.
I am trying to log defects automatically in QC through QTP.
I have done following things to do it:
1. Have set connection between QTP11 and QC 11.
2. Selected the checkbox “Submit Defect to ALM/QC for each failed step” in Tools/Option window.
3. After the execution test gives failed status in the QTPresults but no defect logged into QC defect tab.
Can you please help me out for the same?
Thanks in Advance!
Naresh
how do you get remote agent to close down so i can reconnect a script from ALM? It simply won’t close when I click on exit on the remote agent icon.
Annonomous1 » Are you trying to do this while a QTP testset is still running on the remote machine? If so what I usually do is right click on the “test run scheduler’ icon and select the ‘show scheduler’. Then right click on the show scheduler and chose close. On the msg “Some test are running Do you want to terminate test execution” click Yes. If you get a “Com server Warning” dialog click OK.
Kindly some help me in providing the VB script for the above procedure
SANTHOSH » Sorry not sure I understand — what VBScript are you looking for?
Hi Joe,
First, congratulations for your work. You’ve saved many of my tasks with all your website content. Thanks a lot!
Second, I have a question: I have an issue because QC loses communication with QTP and sets the Test as Failed. I have Patch 10 installed but I’m just about to install Patch 28v2. Can this fix the problem?
Kind regards.
Sebastian.
Sebastian Licea » Thanks Sebastion – It’s good to know that the stuff I post is actually helpful. Not sure if that patch will resolve your issue since this behavior could be caused by a number of things. What version of QTP are you using. Does this happen on all your lab machines?
Hi Joe,
Thanks for the answer. It happens in most of the lab machines, sometimes QC displays “Failed” and some others as “Test Iteration Failed” but QTP continues working. What kind of things can be causing this error?
Regards.