QTP tests fail or QTP hangs when running a long test set from QC

  • Questions
  • QTP tests fail or QTP hangs when running a long test set from QC
Question ID: 105005

Often when we run a long test set (like 30 or 40 tests), the test either inexplicably fails or QTP hangs and sometimes crashes all together. Rebooting might fix this for a while, but then it comes back. Any ideas?

Marked as spam
Posted by (Questions: 344, Answers: 24)
Asked on May 9, 2013 4:43 pm
Answers (2)
Private answer

QTP sucks up a lot of memory, and a lot of times when you run a lot of tests like that, it doesn't let go of some of it, so you'll see in task manager, on the processes tab, QTP's memory usage increases as time goes on. This can cause all kinds of problems. Rebooting will help temporarily, but there is another thing you can do to help mitigate this issue.

On your QTP machine you'll see in the taskbar near the clock an icon for the Remote Agent (If its not there, then Navigate to Start>Programs>HP QuickTest Professional>Tools>Remote Agent). Right click it and click Settings.
You'll see a section called Cleanup and under that a setting for 'Restart testing tool after # runs'. The default is 0. Change this to 5 or 10 or whatever you find works for your test set. What it does, is it will run X number of tests and then restart QTP before proceeding to the next test. This will help clean up the memory and reduce or eliminate most of these problems.

Marked as spam
Posted by (Questions: 16, Answers: 754)
Answered on May 9, 2013 4:44 pm
I tried this out and it helped! No more problems! Thanks!
( at May 9, 2013 4:44 pm)
Private answer

@Michaeldx: In my project i have a similar problem but here my one script runs for 6-8 hours, the scenarios are that big and after 2-3 hrs of run, the synchronization fails w.r.t QTP and application.
In this case I cannot close QTP also.
We have tried adding wait, synchronization time out, contacted HP but mostly no use.
All are recommending to reduce the script size, which we cannot so we face random failure based on complexity of the test case.
Any solution or fix for this?
Thanks in advance

Marked as spam
Posted by (Questions: 0, Answers: 1)
Answered on November 24, 2015 7:01 am