Automation Testing

4 Tips to Make Your UFT & QTP Test Run Faster

By Test Guild
  • Share:
Join the Guild for FREE
Stop Watch

In one of my very first posts on I listed 10 performance tips to help optimize your QTP code. Today I'd like to share four ways in which you can improve the execution time of your UFT with ALM.

I've seen many performance issues with QTP/QC over the years — especially with business process testing. The good news is that HP has slowly been fixed many of these issues. The bad news is that you need to get the latest and greatest versions of each tool in order to benefit from most of the enhancements.

This brings me to the first tip:

1. Be sure you're using the latest versions of UFT and ALM

As I mentioned, HP has addressed many of the performance issues I've raised, but often the only way to take advantage of some of the improvements is to upgrade to the latest versions of their products.

I'm aware that upgrading to the latest version is not always easy, so before doing the upgrade, be sure to contact HP. Sometimes they can give you hotfixes that haven't been released to the general public. (Please do not contact me for these, since HP requires that you contact them directly for any patch/hotfixes.)

2. Use the resources' functionality within ALM

One of the reasons for upgrading to the latest version of ALM and UFT is that there are some enhancements that have been made to the products that radically improve the performance. One of them is the use of resources.

Prior to QTP and QC 10, the main way to utilize resources was to use a relative path to the location of your resources with a list of folders to search. When running tests from either QTP or UFT, it will look for all resources needed and download them before opening and running your tests.

When you use the option of providing a patch to the resources folder in ALM, you will see your script really slow down because if there are a lot of resources, UFT needs to download all of them before running the tests. Not good. If you have to use paths, one way to improve performance is to make sure that your resources are organized in way that doesn't involve deeply nested/complicated folder structures. You want to make your directory structure as simple as possible.

HP recommends that instead of providing the path that you instead store resources in ALM and link them directly to your scripts using the “ALM Resources” option under the File dialog.

3. Reduce network latency

This applies to pretty much any tool, but you want to make sure that your network latency is not too slow. I believe HP found that every 50ms of network latency will cause your test script's execution time to degrade by 2.5 to 6 percent.

There are many things that can cause network latency, so you'll want to work with your network admins to find out how to improve that. A couple of simple things to try would be to either use a wired connection rather than Wi-Fi whenever possible, and/or to disable any firewalls you might have running.

4. Hidden Mode

One feature I don't believe all UFT/QTP engineers are aware of is that you can actually run your UFT/QTP tests in certain modes. One of those is “hidden mode”.

Using the Run UFT in hidden mode will improve your test execution because the UFT UI does not have to render every time a test runs. This will help free up some hardware resources that would normally go to the rendering piece of UFT. Also, since you're just interested in the results of the test it is often unnecessary to actually see UFT running.

To see how to change settings in the UFT Remote Agent check out my post on UFT Remote Agent Settings – How to Keep UFT/QTP Open after a test run.

Those are my top four UFT execution improvements to help Performance

Those are the four main things you can do to try to improve the execution time of your test scripts. Let me know what your top run time tips are in the comments below.

Hope it helps!

Leave a Reply

Your email address will not be published.

This site uses Akismet to reduce spam. Learn how your comment data is processed.

  1. HI Joe,

    We newly upgrade our ALM to 12.53. We are getting performance issues while script is running in ALM. THe status change Connecting->Host Connected->Running test is taking a lot of time. Also while we are selecting a test from a test set list It’s taking like 10 seconds to get selected.

    Did you face any issues. If anyone has the solution, Please share.

    Thanks & Regards,
    Sunil CH

{"email":"Email address invalid","url":"Website address invalid","required":"Required field missing"}

What is Synthetic Monitoring? (2024 Guide)

Posted on 04/18/2024

I've found over the years many testers are unsure about what is synthetic ...

SafeTest: Next Generation Testing Framework from Netflix

Posted on 03/26/2024

When you think of Netflix the last thing you probably think about is ...

Top Free Automation Tools for Testing Desktop Applications (2024)

Posted on 03/24/2024

While many testers only focus on browser automation there is still a need ...