AQtime Object

Applies to TestComplete 15.31, last modified on March 17, 2022

Description

The AQtime object allows you to automate profiling of your tested applications with AQtime version 4.71 or later. To obtain the object in scripts, use the AQtimeIntegration.AQtime property. The AQtime object is also returned by the TestedApp.Run method if the tested application is configured to run in the Profile mode.

Members

Remarks

If you obtain the object by using the AQtimeIntegration.AQtime property, the AQtime version, to which the object provides access, is specified by the AQtimeIntegration.CurrentVersion property. If the object is returned by the TestedApp.Run method, the AQtime version, to which the object provides access, is specified by the parameters of the corresponding tested application.

Example

JavaScript, JScript

function AQtimeIntegrationDemo()
{

  // Specify the AQtime version to profile the project with
  AQtimeIntegration.CurrentVersion = 8;

  // Specify the path to the desired AQtime project
  var sPath = "D:\\MyProjects\\AQtimeDemo.aqt";

  // Open the project and start the Performance profiling
  AQtime.OpenProject(sPath);
  AQtime.SelectProfiler("Performance Profiler");
  AQtime.StartProfiling();

  // Simulate user actions against the application
  // …

  // Wait until profiling is over and close AQtime
  AQtime.WaitForEndOfProfiling();
  AQtime.Close();

}

Python

def AQtimeIntegrationDemo():
  # Specify the AQtime version to profile the project with
  AQtimeIntegration.CurrentVersion = 8
  # Specify the path to the desired AQtime project
  sPath = "D:\\MyProjects\\AQtimeDemo.aqt"
  # Open the project and start the Performance profiling
  AQtime.OpenProject(sPath)
  AQtime.SelectProfiler("Performance Profiler")
  AQtime.StartProfiling()
  # Simulate user actions against the application
  # ...
  # Wait until profiling is over and close AQtime
  AQtime.WaitForEndOfProfiling()
  AQtime.Close()

VBScript

Sub AQtimeIntegrationDemo

  ' Specify the AQtime version to profile the project with
  AQtimeIntegration.CurrentVersion = 8

  ' Specify the path to the desired AQtime project
  sPath = "D:\MyProjects\AQtimeDemo.aqt"

  ' Open the project and start the Performance profiling
  AQtime.OpenProject(sPath)
  AQtime.SelectProfiler("Performance Profiler")
  AQtime.StartProfiling

  ' Simulate user actions against the application
  ' …

  ' Wait until profiling is over and close AQtime
  AQtime.WaitForEndOfProfiling
  AQtime.Close

End Sub

DelphiScript

procedure AQtimeIntegrationDemo();
var sPath;
begin

  // Specify the AQtime version to profile the project with
  AQtimeIntegration.CurrentVersion := 8;

  // Specify the path to the desired AQtime project
  sPath := 'D:\MyProjects\AQtimeDemo.aqt';

  // Open the project and start the Performance profiling
  AQtime.OpenProject(sPath);
  AQtime.SelectProfiler('Performance Profiler');
  AQtime.StartProfiling;

  // Simulate user actions against the application
  // …

  // Wait until profiling is over and close AQtime
  AQtime.WaitForEndOfProfiling;
  AQtime.Close;

end;

C++Script, C#Script

function AQtimeIntegrationDemo()
{

  // Specify the AQtime version to profile the project with
  AQtimeIntegration["CurrentVersion"] = 8;

  // Specify the path to the desired AQtime project
  var sPath = "D:\\MyProjects\\AQtimeDemo.aqt";

  // Open the project and start the Performance profiling
  AQtime["OpenProject"](sPath);
  AQtime["SelectProfiler"]("Performance Profiler");
  AQtime["StartProfiling"]();

  // Simulate user actions against the application
  // …

  // Wait until profiling is over and close AQtime
  AQtime["WaitForEndOfProfiling"]();
  AQtime["Close"]();

}

See Also

AQtime Object
CurrentVersion Property
Integration With AQtime

Highlight search results