All About the Apps
Showing results for 
Search instead for 
Do you mean 

4 tips to improve the performance of your HP UFT tests

Anonymous_User1 ‎03-19-2014 10:00 AM - edited ‎09-09-2015 03:17 PM

(This post was written by Amir Wigelman and Slavik Muravetskiy, from the UFT R&D Team, and Yossi Camjalli, from the Performance Center of Excellence Team)


HP Unified Functional Testing (UFT) and QuickTest Professional (QTP) have been integrated with HP Application Lifecycle Management (ALM) and Quality Center (QC) right from the beginning. You can store your tests in ALM/QC, and when it’s time to run them, QTP/UFT downloads them from ALM.  There are a number of factors that affect the time that it takes to open and run these tests.


The integration has gone through a number of evolutions over the years, but we always maintained backward compatibility. However, we found that by taking advantage of the latest technology in UFT and ALM, you can make a big difference in the amount of time it takes for your scripts to download and run.


You can download HP Unified Functional Testing here.


What did we measure?

We ran some experiments on a number of different environments, and came up with the following results for opening a test from ALM, using UFT 11.53 (on Windows 7 SP1) and ALM 11.52 (on Windows 2008 R2 SP1):



The script we ran contained 5 function libraries, 10 object repositories, 5 external actions, 1 data table, 1 recovery scenario, 1 environment variable, and had 200 lines of VBScript in each action. Each of the function libraries contained a single function with 2000 lines. 


You can see that there is a significant improvement when the resources are managed by ALM. Similarly, we found significant improvements when recent versions of ALM/QC are used.  This led us to the recommendations below.


Tip #1: Upgrade to the latest versions of ALM/QC and UFT

Our experiments show that running UFT 11.5 with ALM/QC 11.5 takes between a half to a third of the time that it takes to open the same script using QTP 11 and ALM/QC 11.


So whenever possible, upgrade your environment to the latest versions of ALM/QC and UFT. (From what I hear, the newest versions of ALM and UFT will be released any day now. But hush, you didn’t hear it from me.)


Tip #2: Manage your scripts’ resources in ALM

 QTP and UFT scripts can use external resources such as object repositories and function libraries.  References to these resources can be added to a script in two different ways:

  1. Providing a path to the resource folders in ALM/QC (using a relative path to the location of the resource  and a list of search folders);
  2. Storing the resource in ALM, and linking to it directly from the script by choosing “ALM Resources” in the File dialog.


In earlier versions of QTP, the only way to reference resources was the first way; by providing a path to each resource from within the script.  But as of QTP 10 and QC 10, you can store each resource in QC, and refer to them from the script as described in the second option.


When UFT/QTP opens the script, it looks for the resources and downloads them before opening and running the test.  If you use the first way, it can be time consuming if there are a lot of resources and search paths in the script.  (If you must use paths, take into account that the time to open the script is also affected by the complexity of the search path.  So organize your resources so that they’re not nested deeply inside a complicated directory structure)


But if you’re using a combination of QTP/UFT and ALM/QC that supports maintaining the resources in ALM/QC, the resources are downloaded much more efficiently, significantly reducing the amount of time it takes to open a the script.


How to change a test to refer to its resources in ALM

1)      Back up your test before you make any changes

2)      Open your UFT script for editing

3)      Open the Test Settings screen

4)      Select a resource and locate it in ALM Resources module using the File dialog

5)      Check that script still runs correctly

6)      Save your test

7)      Check that the test opens more quickly.



We found that opening a script with UFT 11.5 and ALM 11.5 with its resources managed in ALM took up to a third of the time to open compared with the same script configured with relative paths.


Tip #3: Reduce the latency between the QTP/UFT client and ALM/QC server

When we ran the script with UFT 11.5 and ALM 11.5, we found that every 50ms of network latency degrades the execution time of the test by between 2.5 to 5 percent.  If you have a latency of 400ms, your performance degradation could be up to 40 percent, which is highly significant.


And if you’re using relative paths and search folders, the performance degradation will be even worse.


When we measured opening a large test which used relative paths, on a network with 400ms latency, we saw up to 700 percent degradation compared to a network with low latency.


Tip #4: Running QTP/UFT in hidden mode

 While executing test sets from the ALM Test Lab, you don’t usually need to oversee the process, just review the results at the end. So there is no need for QTP/UFT to draw its user interface on the execution machine, because it wastes precious hardware resources. You can enjoy this performance benefit by configuring UFT’s Remote Agent as follows: 

  1. Invoke the Remote Agent by selecting Start > All Programs > HP Software > HP Unified Functional Testing > Tools > Remote Agent
  2. The Remote Agent’s icon will then appear in the Windows tray (). Right click on it and select “Settings” from the context menu
  3. Check the ‘Run UFT in hidden mode’ checkbox



Next time you run tests remotely, UFT will run without rendering its graphical user interface.


For some other tips on speeding up your tests, take a look at this post on the UFT discussion forum.


Leave us a comment below to let us know if these tips helped you improve the time to open and run your tests.


Learn more about HP Unified Functional Testing here.


Click here to download HP Unified Functional Testing.


Thanks to Amir, Slavik and Yossi for providing this article!



About the Author


on ‎03-24-2014 10:34 PM

Really Very Good analysis and that too with actual quantifiable measures

Even we know the good practices , but often we miss small things to implement like mentioned in article


Great , Keep it up , hope too see more atricles on other areas of improvement




on ‎03-26-2014 10:15 PM

Thanks those were some good tips when QTP is used on conjunction with ALM.


We also wrote an article sometime back on optimizing QTP scripts. We would love to have your thoughts on them and in case you have some additional points to note.

on ‎04-09-2014 04:42 PM



Also, it would be great if we can find the performance tips for UFT API 11.53. We are spending a lot of time on that due to slowness when scripts stored in ALM 11.00 Patch9.

scripts gets corrupted when stored in ALM11.00.

on ‎06-17-2014 12:12 AM

Thank for the hints.


We did some test related to the start up time with UFT 11.53patch2 and ALM 11.52, do other user get simular results: 15 seconds to start UFT and 57 seconds to start the test.


Best Regards,


on ‎07-22-2014 07:32 AM

Was your testing of ALM against a local install or the Saas version?

on ‎10-13-2014 10:50 PM

I have a question, I always run in hidden mode for all my machines (it is on default). When you start running, a balloon appear on the bottom right stating;


Unified Functional Testing is Currently Running

Unified Functional Testing is running in hidden mode.

To make Unified Functional Testing visible, click here....


When someone click on the balloon, UFT will be displayed when user running the test which is okay. The problem is, in the settings as per shown in Tips#4, the setting still ticked the option  ‘Run UFT in hidden mode’ checkbox, eventhough it is NOT RUNNING IN HIDDEN MODE. 


Question is how to make it run in hidden mode again? Its more like a bug to me.

on ‎12-15-2014 11:08 PM


We are using UFT12 with ALM11.52 patch1. While execting the UFT scripts directly from ALM Test lab, After completion of execution UFT is taking long time to close say two to 3 min. if the scripts are kept in bulk it is throwing an error in Automatic runner window saying "Test tool was terminated by timeout recovery mechanism". Remote agent settings are kept as suggested above. still the same. could anybody help me how to overcome this issue.




27 Feb - 2 March 2017
Barcelona | Fira Gran Via
Mobile World Congress 2017
Hewlett Packard Enterprise at Mobile World Congress 2017, Barcelona | Fira Gran Via Location: Hall 3, Booth 3E11
Read more
Each Month in 2017
Software Expert Days - 2017
Join us online to talk directly with our Software experts during online Expert Days. Find information here about past, current, and upcoming Expert Da...
Read more
View all