Enhancing TestComplete Performance

Applies to TestComplete 15.70, last modified on December 17, 2024

Automated tests give several benefits to QA engineers: automated tests are more consistent, they make the testing process cheaper and faster than manual testing. However, even automated tests may sometimes take a significant amount of time. You can increase the speed of test runs in several ways:

Disable Features You Do Not Use

TestComplete includes multiple features allowing it to run in a wide variety of situations and provide extensive feedback on events happening during tests. However, if you need to test a particular application and have already optimized your test, these features may slow down your test execution instead. In this case, we recommend that you disable or limit them.

  • You can reduce the size of the Name Mapping repository:

    • During test recording, TestComplete automatically captures images of mapped objects and adds them to the Name Mapping repository. If you do not want to store the images or if you need to decrease memory consumption, select Do not store in the Store images section of the Store Name Mapping Data dialog, in the Name Mapping editor:

      Enhancing TestComplete performance: Removing images from the Name Mapping repository

      This will remove images of all mapped objects from the Name Mapping repository.

    • By default, the Name Mapping repository stores complete information on properties and methods of mapped objects. This information is relevant only at design time and does not affect the test runs.

      You can disable storing object methods and properties to reduce the Name Mapping repository. To do this, select Do not store in the Store Code Completion data section of the Store Name Mapping Data dialog, in the Name Mapping editor:

      Enhancing TestComplete performance: Removing Code Completion information from the Name Mapping repository
    • If you do not use Name Mapping in your project, disable the Map object names automatically option and remove the NameMapping project item from the Project Explorer.

  • You can disable Test Visualizer. Capturing images takes additional time and requires a lot of disk space.

    As an alternative, you can configure Test Visualizer only to capture images and not to collect data on test objects whose images it captures.

    You can also configure Test Visualizer not to update frames during test runs.

  • In the File | Install Extensions dialog, you can disable plugins that your tests do not use. This will narrow down the TestComplete functionality and speed up searching for objects and methods.

    We recommend that you disable the following plugins (if you do not use them in your tests):

    • Visual C++ Application Support

      Delphi and C++ Builder Application Support

    • UI Automation Support

      Microsoft Active Accessibility Support

      Text Recognition

      As an alternative, if you use UI Automation, Microsoft Active Accessibility or Text Recognition in your tests, you can configure your project to recognize only the objects necessary for your tests. See below.

    You can also disable other plugins you do not use in your tests. This will not affect the test run speed, but TestComplete will start faster.

  • If you use supplementary object recognition approaches (UI Automation, Microsoft Active Accessibility or Text Recognition) or if you test JavaFX applications, we recommend that you configure your project to recognize only the objects necessary for your tests.

    For instance, we recommend that you not use the * (all objects) preset in the list of recognized objects that you specify in your projects:

    Enhancing TestComplete performance: Configuring the list of applications TestComplete will recognize by using Microsoft Active Accessibility

    Click the image to enlarge it.

    Otherwise, it can take long for TestComplete to expose all the objects that can slow down your test performance.

    In addition, if the accessibility information or the UI Automation information in your tested application is implemented incorrectly, the application may fail when TestComplete tries to access that information. If, in your test, you do not need the active accessibility information or the UI Automation information to recognize the tested objects, disable the appropriate plugins or configure your projects to exclude objects you do not need in your tests.

    We recommend that you use presets that explicitly specify objects you use in your tests.

    We also recommend that you configure your project to recognize the needed objects properly before you start creating tests. Otherwise, if you modify the recognition properties after creating tests, those tests may fail during the run.

  • You can filter applications with which you do not work in your tests by using the Process Filter. This will narrow down the number of applications TestComplete treats as Open and speed up working with them:

    1. Open the project for which you want to filter applications and select Tools | Current Project Properties from the TestComplete main menu.

    2. Click Open Applications | Process Filter on the resulting Properties page.

    3. Select the needed process filter mode.

    4. In the Process list, specify the applications TestComplete should treat as Open or black-box ones (depending on the process filter mode you have chosen):

      Enhancing TestComplete performance: Configuring process filter

      Click the image to enlarge it.

    For example, you can configure TestComplete only to treat applications stored in the Tested Application collection of your project as Open.

  • If your automated test does not use internal objects of the application, you can disable the Debug Info Agent, a special subsystem used to get access to them through debug information. Reading and parsing debug information can take some time, and this can significantly slow down the automated test execution.

  • To test Silverlight applications, you can use the Silverlight Open Application Support plugin or the Microsoft UI Automation technology. The plugin exposes all controls in Silverlight applications, including those that may be unnecessary for testing. If you do not need the methods provided by the plugin, you can increase the test run speed by using the UI Automation technology (see Testing Silverlight Applications - Overview). As an alternative, you can reduce the number of objects the plugin exposes by configuring the Object Mapping options of your project.

Prepare for Automated Testing

Unless specified otherwise, TestComplete performs tests with default options and in default operating system conditions. These settings are optimized for stability and usability. However, when running automated tests, they may be suboptimal. You can change them to increase the test execution speed.

Note: Please be careful: changing these settings can cause errors during the test run.
  • You can optimize the time during which TestComplete waits until the needed window or control becomes available:

    • By specifying the Auto-wait timeout in project options.

    • By setting a timeout value in the Auto-wait timeout column in keyword tests.

    • By calling the Wait method in script tests.

    Set a shorter timeout interval to increase the test run speed.

    Note: Using very short timeouts may cause errors, because your tests will not wait for objects to appear.
  • You can adjust the delay between actions using the Playback group of TestComplete project properties.

    The lower the delay values are, the faster the test execution is.

    Note: Using the lowest settings may cause errors during the test execution.
  • You can increase the speed of double-clicking in your operating system. This will also increase the speed of single clicks since TestComplete pauses the execution until the double-click timeout elapses.

    Note: Fast double-clicks may be inconvenient for the users working on the computer.
  • You can disable extra UI visual effects of your operating system. Using settings that provide the best performance will increase the test execution speed.

    Note: Changing UI settings may affect your application appearance. Make sure to adjust your tests appropriately.

Optimize Your Tests

TestComplete provides multiple ways to simulate user actions. In some cases, modifying your tests will increase their execution speed:

  • Recorded tests usually use high-level methods because they are more concise, easy to read and encapsulate more verifications. However, basic commands provide faster playback.

    For example, the Sys.Desktop.MouseDown and Sys.Desktop.MouseUp methods work on a lower level than the Click method, and are simulated faster. The Click method, in its turn, works on a lower level as compared to the ClickItem method.

    You can replace high-level methods in your tests with lower-level ones to increase the test run speed.

    Note: Using lower-level methods can make tests more complex and less stable.
  • You can optimize your recorded low-level actions. When recording these, tests often record extra unneeded delays or actions. You can delete these delays and extra actions to increase the playback speed. Deleting important actions may cause your test to behave in unexpected ways.

Helpful Resources

You can find more information on improving your experience with TestComplete on our website:

https://support.smartbear.com/articles/testcomplete/

See Also

System Requirements
TestComplete Tips

Highlight search results