Increasing run speed

If your tests are being executed slowly, it may be down to a number of factors. In this recipe, we will consider the most frequently emerging problems and their possible resolutions.

How to do it...

In order to increase run speed, we can perform the following changes:

  1. Disable Visualizer (detailed steps can be found here: http://support.smartbear.com/viewarticle/28968/#Enabling).
  2. Use the filters in the Object Browser tab to decrease number of the objects displayed.
  3. Work directly with the properties (an example can be found in the Entering text into text fields recipe in Chapter 3, Scripting).
  4. Disable the unused TestComplete plugins by going to File | Install Extension... menu and unchecking the unnecessary plugins.
  5. Disable Debug Agent (detailed information can be found here: http://support.smartbear.com/viewarticle/27468/.

How it works...

Visualizer allows us to capture screenshots of the window that TestComplete is currently working with each time TestComplete interacts with the controls elements. Since this can happen quite often, creation of the screenshots will be time consuming, and there is no necessity to capture all the resulting screenshots, so, it is recommended that the Visualizer be turned off. The method to turn off the Visualizer varies in different versions of TestComplete.

Frequent resorting to the aqUtils.Delay method in the tests may significantly slow down scripts execution time. Try to avoid usage of this method by replacing it with the corresponding Wait functions.

The Object Browser tab allows us to flexibly customize the displayed objects with the help of the filters buttons in the upper part of the Object Browser panel. It is recommended to disable the invisible objects and display only the processes that pertain to the tested applications. This will expedite renewal of the tree of objects.

See also

  • The Waiting for an object to appear recipe in Chapter 5, Accessing Windows, Controls, and Properties
  • The Entering text into text fields recipe in Chapter 3, Scripting
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.142.166.31