QTP & Quality Center – Running Long Test Sets Issues

Automation Guild Online Conference Top ad

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!




23 comments
Anonymous - December 16, 2011

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.

Reply
    Joe Colantonio - December 16, 2011

    Anonymous » Cool – glad it helped you!

    Reply
Naresh - December 21, 2011

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

Reply
Annonomous1 - March 28, 2012

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.

Reply
    Joe Colantonio - March 30, 2012

    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.

    Reply
SANTHOSH - June 25, 2012

Kindly some help me in providing the VB script for the above procedure

Reply
    Joe Colantonio - June 25, 2012

    SANTHOSH » Sorry not sure I understand — what VBScript are you looking for?

    Reply
Sebastian Licea - August 6, 2012

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.

Reply
    Joe Colantonio - August 8, 2012

    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?

    Reply
      Sebastian Licea - August 14, 2012

      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.

      Reply
senthamizh - November 10, 2013

Hi Joe

I am scheduling a test set in qc. Will the test execution happens in back end r front end

Thanks
Tamizh

Reply
Mrs Rooban - November 20, 2013

Hi Joe,

Your website helped me to see the OTA API feautures!
Thank You so much!

– Mrs Rooban

Reply
Jay - February 27, 2014

Hello Friends,
I saw this wierd problem with QC-ALM executing tests on different machines remotely. I have a test set of around 500 tests and I have 6 machines. I assign different machines (5) in the “Execution Grid” Planned Hostname (100 tests per machine) and start the execution from the 6th machine (unchecking the Run Locally) so that the tests run on 5 different machines simultaneously and remotely. But what I’ve observed is the 1st test shows as “running”, few below that show as “Waiting” and rest of them are BLANK (idle). Anyone else observed this? Any possible workaround?

Reply
    Akash - March 20, 2015

    Facing the same issue in the following two conditions:

    1 : Parallel triggering – Single Test set- Issue
    Consider single test set (functional type) which has 80 test conditions assigned to 35 testing hosts .
    if we run all conditions in parallel , I see only 6 to 7 testing hosts are picked up in operational mode and running.
    The remaining testing hosts becomes non-operational mode.

    Error log of testing host : (user authorization issue – The time slot BVS RunId is went down for the one user, The testing hosts are now turned to non-operational mode).
    and after few minutes testing hosts were again came back to Operational Mode with Idle state .

    2 : Parallel triggering – Multiple Test set – Issue

    I also created 12 test sets each having 5 test conditions allocated to 5 different testing hosts and triggered in parallel,
    I see only 1 to 2 testing hosts are picked up in operational mode of each test set and the remaining went to Non-Operational mode and after few minutes it again came back to Operational with Idle state .

    Please help me here!! :(

    Reply
Hari - March 12, 2015

Hi Joe,

I am executing the scripts from ALM test set, first script executes without any issue first time but some times unable to execute the second script it keep o showing connecting, i checked the remote agent settings it is showing the Restore testing tool values as 0, i am not getting what is the issue, can you please help on this.

Reply
James - March 18, 2015

This is really great! It solved my issue. All my test cases now able to complete as expected and no more Not Completed result. Thank you so much!

Reply
Sohail - June 2, 2015

Hi Joe,

Thankyou so much for the most, It really worked and everyone else mentioned this solved my issue.

Best wishes
Sohail

Reply
lgarnier - June 16, 2016

Hi,

first, excuse me for my poor english, I’m french (nobody’s perfect).
second : good job Joe !!! I found many solutions on your web site :-)

About your question on the remote agent, it can not be a universal solution.
Imagine you have 10 scripts that work together and form a coherent whole.
For exemple, the first script sets global variables, and the following use these variables.
If the remote agent occurs, the contents of variables is lost and the following scripts will be in error.

Originally, the problem is that the memory allocated to local variables is not freed when the script is finished. This is a bug, and the remote agent is only a workaround.

Regards
L. Garnier

Reply
rh - August 29, 2016

Hi Joe

I am using UFT 12 and I want to add more than 10 Test cases to solution.

Any help please.

Reply
Faizan Mansuri - February 16, 2017

Hi
I am facing an unusual problem.
My scripts run fine on local Machine but they fail to identify objects when on remote machine..

I have shared repository associated and no local objects.

Please help…!!

Reply
Click here to add a comment

Leave a comment: