Features Added to TestComplete 4.0

Applies to TestComplete 15.47, last modified on January 20, 2023

This topic describes the changes made to TestComplete 4.0. For information on the changes made to other versions of the product, see Version History.

Overall Improvements

  • New project structure, project items. The entire project structure has been changed. Now projects consist of project items which you may use to perform various testing actions. For instance, to handle events, you should add the Events project item to your project; to use low-level procedures, add the Low-Level Procedures Collection item, etc.
    Project items may have one or several child elements that you may use in your testing actions. You can add project items and their child elements to TestComplete project very much like you add files to a Visual Studio project.
    Use of the project items make it easy to understand what the project does and helps you easily share project components among your testing team.

  • New enhanced IDE. With new exciting user interface of TestComplete 4, a user has all of TestComplete features at hand, which makes working with the product easier and more convenient.
    A new Project Explorer panel provides an organized view of your project suites, projects and their child elements. It provides quick access to any project item and lets you easily manage the project contents and the test log.
    To modify project items and their child elements TestComplete offers special editors shown in the Workspace panel.
    Any panel can be hidden or shown using the Auto-Hide feature (see Docking).

  • Test Items. The sequence of tests to be executed is now specified by the test items tree that is created visually. This makes test suites obsolete. They have been removed. When you open a project created in earlier versions of TestComplete, TestComplete 4 converts test suites into a sequence of tests specified by project properties. Project suite properties also let you specify the execution order of projects that belong to the project suite.

  • New test log view and structure. Previous versions of TestComplete had separate panels for displaying results of project suites, scripts, network suites, HTTP load testing, etc. In version 4 all the logs were united into one solid structure that combines all the functionality of all the old log panels and makes analyzing test results easier and more convenient. For instance, by a couple of mouse clicks you can command TestComplete to filter results, sort them, calculate the summary of different kinds, etc. You can define the font name, color, background color and other settings for values displayed in the log. Also, TestComplete can now build charts and graphs for log data that is represented as a table. Finally, the test log includes built-in features for sending the results via e-mail. See Test Results for more information.

    By double-clicking a message in the test log window, you can switch to a script line holding the script function that posted this message to the log. In earlier versions of TestComplete this functionality was only available for DelphiScript. TestComplete 4 introduces it for all supported scripting languages.

  • Advanced log messaging system. Now each message posted to the log may have an image associated with it. In addition to messages, images and files, you can also post links to any file or Web page. New methods of the Log object allows you to organize messages into folders, thus, giving you a possibility to build the hierarchy of messages at your desire. See Posting Messages, Images and Files to the Log.

  • Unicode support. The Code Editor now fully supports Unicode. This lets you create scripts for testing of applications that use multi-byte or double-byte strings (Japanese, Chinese, various Asian languages and so on). See Unicode Support.

  • Integration with issue-tracking systems. Now you can easily post bug reports or create items of any other type in issue-tracking systems like Microsoft Visual Studio 2005 Team System or AutomatedQA AQdevTeam. For example, by using mouse clicks in the test log window you can create an item with attached test results. You can also create items from scripts. See Integration With Issue-Tracking Systems for more information.

  • Integration with Microsoft Visual Studio 2005 Team System. TestComplete 4 includes a special package that integrates into Microsoft Visual Studio 2005 Team System, providing a test item of the TestComplete type. Using this test item you can execute TestComplete projects directly from test projects created with Microsoft Visual Studio 2005. See Integration With Microsoft Visual Studio and Azure DevOps.

  • Manual testing. TestComplete 4 now supports a new testing type called manual testing. This lets you easily interweave automated tests (tests that do not require user intervention) with tests that should be performed manually (that is, with tests that require user intervention).

  • Optical character recognition (OCR). TestComplete 4 includes the scriptable OCR engine that can “read” the text within an application window and convert it to usable ASCII or Unicode text. Using the engine along with images search capability and you can better control the state of the application under test by “reading” the text of non-window elements. See Using Optical Character Recognition.

Load Testing Improvements

TestComplete 4 extends the support for the load testing offered by previous versions of the product. With version 4 you can:

  • Manage your load tests with ease. All the functionality needed to record, modify, manage and perform load tests is provided by the HTTP Load Testing project item. You can either create the tests yourself or import them from another project.

  • Create load test visually. Now you can create and execute load tests visually without writing a single line of code. With the new load test editor, even inexperienced users can easily create virtual users, organize them among workstations, assign tasks to virtual users, etc. Load tests created visually can be executed as test items of a project, or they can be executed from scripts.

  • Simulate various browsers with ease. Regardless of the Web browser used to record the traffic, TestComplete 4 can emulate the use of other browsers during the test execution. That is, the recorded requests are sent by another browser rather than the one you used for the recording. The list of browsers supported for the playback includes Internet Explorer, Firefox, Opera, Netscape Navigator, Pocket IE and Smart Phone.

  • Modify traffic visually. Using a new editor you can visually modify the recorded requests and responses. You can change not only the HTTP traffic, but also SOAP requests.

  • Test Web servers supporting NTLM authentication. TestComplete 4 can record the traffic to the Web servers that use the NTLM authentication.

  • Use new objects and methods to specify load test properties in scripts. The way you create virtual users in scripts has been changed. The term virtual user group has been replaced with test instance. There are also special methods that let you easily specify the browser to be simulated by a user and the start delay for simulation.

  • Automatic Changing of Proxy Settings. In order for TestComplete to be able to record HTTP traffic, you need to specify the TestComplete computer as a proxy for all Web browsers that will participate in the recording. For some Web browsers running on the TestComplete computer (for example, Microsoft Internet Explorer), TestComplete can modify the proxy settings automatically. In previous version you had to do this manually.

Improvements in Web Testing

Besides HTTP load testing, TestComplete also provides scripting access to Web page elements, so you can write script code for functional testing of Web pages. TestComplete 4 extends the support for such Web testing:

  • Enhanced Support for Web Browser Controls. Earlier versions of TestComplete had access to elements of Web pages shown in Internet Explorer only. Now TestComplete has access to elements of Web pages shown in any instance of the Web Browser control. For instance, it has access to elements of a page shown in the HTML Help file viewer or to elements of a page shown in the Web Browser control on an application form.

  • Improved Recognition of Modal Windows. Scripts located on Web pages may call the showModalDialog function to display a Web page within a modal Web browser window. Previous versions of TestComplete could not “see” elements located on these modal windows. Version 4 can.

Enhanced Support for .NET Applications

Like previous versions, TestComplete 4 supports testing of Microsoft .NET applications and extends user possibilities in testing these applications:

  • Extended support for data types, arrays and strings:

    • TestComplete now supports 64-bit properties and fields.

    • TestComplete now supports properties, fields and methods that return arrays or use arrays as parameters. The previous versions of TestComplete did not support arrays.

    • Now you can assign a null string pointer to a property or pass a null pointer as a parameter to a method of an object in a .NET tested application.

  • Complete support for the VCL.NET. Now you can get access to internal objects, methods and properties of .NET applications created with the VCL.NET library (Borland Delphi for .NET, Borland Delphi 2005, Borland C#Builder).

  • Enhanced support for GUI method calls. In multi-threaded applications, methods of GUI objects should be called within one thread. Else, errors may occur in your application. Version 4 follows this rule - when you call methods of GUI objects from TestComplete scripts, the methods are executed in an appropriate thread of the tested .NET application. The previous versions of TestComplete did not conform to this rule.

  • Faster functioning. TestComplete works faster with .NET applications.

Enhanced Support for Java Applications

The support for Java applications has been dramatically improved:

  • Java Open Applications. Now Java applications are always “open” to TestComplete. There is no need to include special files and recompile applications in order to get access to internal objects, methods, fields and properties. See Testing Java Applications - Overview.

  • Extended support for data types, arrays and strings:

    • TestComplete now supports properties and fields having the long type.

    • TestComplete now supports properties, fields and methods that return arrays or use arrays as parameters. The previous versions of TestComplete did not support arrays.

    • Now you can assign a null string pointer to a property or pass a null pointer as a parameter to a method of an object in a Java tested application.

  • Virtual machine support. TestComplete 4 supports one more Java virtual machine - BEA JRockit 5.0.

  • Support for SWT controls has been extended. Now TestComplete automatically recognizes SWT controls.

  • Enhanced support for GUI method calls. In multi-threaded applications, methods of GUI objects should be called within one thread. Else, errors may occur in your application. Version 4 follows this rule - when you call methods of GUI objects from TestComplete scripts, the methods are executed in an appropriate thread of the application under test. The previous versions of TestComplete did not conform to this rule.

  • Faster functioning. TestComplete works faster with Java applications.

Open Application Improvements

  • Support for multiple Open modules. In previous versions of the product, TestComplete could automatically “open” only one type of objects. For instance, if you have a Delphi application and a Visual C++ DLL loaded by this application, TestComplete will consider the application as a Delphi Open Application. The Visual C++ module will not be “open”. Version 4 is free from this limitation. So, the application can be both a Delphi Open Application and a Visual C++ Open Application.

  • The calls to an application’s methods and properties have been improved. An object of an Open Application may contain a method or property which name coincides with the name of a method or property that is added to this object by TestComplete. To avoid naming conflicts, previous versions of TestComplete changed the property and method names defined by the application code, which makes addressing of objects of Open Applications inconvenient. Now the names are not changed. The method to be called is specified by a namespace that corresponds to the type of the application that holds the method. For instance, to call the Click method defined in a Visual Basic object, use the NativeVisualBasic namespace; to call methods provided by MSAA, you may use the NativeMSAA namespace, etc. Namespaces also made the native keyword obsolete. It has been removed. For complete information, see Using Namespaces.

  • New methods for addressing objects of Open Applications. In previous versions of TestComplete, you could address objects of Open Applications by object names:

    p1 = Sys.Process("MyOpenApp");
    w1 = p1.MainForm;

    To address objects of an Open Application, version 4 offers special methods: WinFormsObject, VCLNETObject, VBObject, VCLObject, SwingObject, WFCObject, etc.:

    p1 = Sys.Process("MyOpenApp");
    w1 = p1.WinFormsObject("MainForm");

    The only exception is Open Applications created in Visual C++ 6.0 since the addressing of windows and objects of these applications has not been changed.

    The program objects returned by these xxxxObject methods contain both methods and properties defined by the application code (for example, methods and properties of .NET or VCL classes) as well as methods, properties and actions provided by TestComplete. To call the object method or property which name coincides with the name of a method or property added by TestComplete, use namespaces.

  • Java Open Applications. Java applications created with Swing, AWT, SWT and WFC libraries are now “open” to TestComplete.

  • Custom object structure and properties for Open Applications. You can write a plugin that will build a custom object tree for your Open Application or add custom properties and methods to objects in that application. These methods and properties can then be used by TestComplete for testing purposes.

Changes and Improvements in Program Objects

  • Natural model of tested objects. In previous versions of TestComplete, the process-window hierarchy typically included three levels of object: processes, top level windows and child windows (all child windows were at the same level, regardless of their actual parent-child relationship). The new model offered by TestComplete 4 reflects the actual parent-child relationship of windows that is more natural. The old model, though, is also supported. The old model is called Flat and the new model is called Tree. To choose the desired model, use the Object tree model property of your project.

    Note: Script created for the old model cannot be run correctly, if the new model is active and vice versa. If you open a TestComplete 3 project in TestComplete 4, choose the old object model (Flat).
  • Better organization of Sys methods and properties. The set of methods and properties of the Sys object has been changed. Methods and properties that dealt with the desktop have been moved to the new Sys.Desktop object. The Delay method has been moved from Sys to the BuiltIn object. So, now you can call it in your scripts as BuiltIn.Delay or just Delay.

  • More information about the operating system. Using the new Sys.OSInfo object you can obtain more information about the system on which TestComplete is running: version number, system folder name, temporary directory, versions of installed .NET Frameworks, etc.

  • Namespaces. An object may contain several methods or properties having the same name. For instance, a button may have the Click method provided by the application code and the Click action provided by TestComplete. More Click methods can also be added by TestComplete subsystems or third-party plugins. Using namespaces you can specify which of the Click methods to be called in your scripts. There are special namespaces for each application type: NativeVisualBasic, NativeMSAA, NativeDelphiObject, etc. The namespaces made the native keyword obsolete. It has been removed. For complete information, see Using Namespaces.

  • More information about processes. The process object contains a new number of new properties that provides information on the process priority, number of active threads, etc.

  • More information about windows. The window objects contain new properties that let you determine the window style and Unicode support. Some methods have also been changed.

  • New means for simulating keypresses. Each onscreen object now contains the Keys action that synthesizes and sends a keystroke to that object. The Sys object also contains the Keys method. It sends the keystroke to the currently focused window in the system.
    The parameter of the Keys method can now specify the key to be pressed by virtual-key code. TestComplete also supports special constants that let you simulate the pressing and releasing of keys, so that the Keys method can now simulate more complex keypresses than those that it could simulate before.

  • Enhanced keyboard layout control. Using the new BuiltIn.SetKeyboardLayout method you can switch the keyboard layout in your system from your scripts.

  • New methods of the Log object. The Log object now lets you post images along with messages to the log, create a hierarchy of folders in the log, etc.

  • Means to check whether a plugin is installed. Using the new BuiltIn.IsPluginInstalled function you can check whether a plugin required by your project to run are installed in TestComplete. If the plugin is not installed, you can post a message to the test log notifying other testers about the problem.

  • Support for timers. TestComplete 4 includes a new object, Timers that let you create and modify timers in your code. So, now you can execute a script routine at regular time intervals. See Using Timers.

  • Changes in methods of the Log object. The TestComplete log subsystem has been dramatically improved and methods of the Log object have also been changed greatly:

    • Now each message posted to the log can have an image associated with it.

    • The way you specify the font and color settings for messages have also been modified.

    • Messages can now be organized into folders.

    • Etc.

    All of these changes make the old Log object incompatible with the new log implementation. So, in order for the projects that were created in earlier versions of TestComplete to be run in version 4 and post messages to the test log, you should install the TestComplete 3 Compatibility plugin that makes it possible to use the old Log methods and properties.

  • Changes in the Options object. TestComplete 4 includes the Options object that lets you check values of TestComplete options from your scripts. However, in version 4 the Options object does not support editing of TestComplete settings from scripts.

  • Changes in DbgServices object. The DbgServices object includes a new Options property that lets you get or set values of DbgServices options from scripts.

  • Changes in Win32 objects:

    • Methods and actions, which names coincided with common actions (Click, DblClick, etc.) have been renamed to ClickItem, DblClickItem, etc.

    • Parameters of all methods that simulate user actions over items of the tree view, list view and other controls can accept wildcards (* and ?) in the item name.

    • Win32 objects got new methods and properties that give you more possibilities to simulate user actions.

    • TestComplete includes a new program object - Win32Header - that provides a scripting interface to the Win32 header controls.

  • Special objects to work with projects and project suites. TestComplete 4 includes the Project and ProjectSuite program objects that let you obtain the project (or project suite) file name, location, get access to local variables of the project or project suite types, etc.

  • Better support for clipboard operations. Now the Sys.Clipboard property supports images, that is, you can use this property to put text and images to the clipboard or retrieve the text or images stored on the clipboard.

  • Better support for calls to routines declared in other units. To call a routine or variable declared in another unit, the use name can be used as a prefix for the routine name (for example, MyHelperUnit.MyRoutine). In earlier versions of TestComplete this approach worked for DelphiScript only and did not work for other scripting languages. In version 4 it works for all of the supported scripting languages.

  • New object to automate AQtime. Version 4 includes a new AQtimeIntegration object that provides you with more control over AQtime: it lets you select the profiler, get results during the profiler run, attach to processes, etc. This makes the slAQtime object obsolete. It is supported for backward compatibility only. See Integration With AQtime.

Changes in Network Suites

  • Network Suite project item. The functionality needed to perform distributed testing is provided by the Network Suite project item.

  • Enhanced control of remote workstations. A task can now reboot or shutdown the remote workstation at the end of the run. The action to be performed is specified visually, in the Editing Task Properties.

  • Support for various types of tests. A task executed on the remote computer may run not only script routines, but tests of any other type (low-level procedures, load tests, projects, etc). The test to be run is specified in the Tasks Editor.

  • Changes in network suite variables. To edit network suite variables TestComplete offers a special page for the NetworkSuite project item. To address the variables in scripts, use the NetworkSuite.Variables property.

  • Automatic detection of master and slave projects. Version 4 does not divide projects into master and slave. The type of project is determined automatically: if a project controls the distributed testing (runs other projects) it is master, else, the project is a slave.

Unit Testing Improvements

The unit testing support has been extended:

Name Mapping Improvements

The Name Mapping feature has been greatly improved since the latest version of TestComplete 3:

  • Use the tree of mapped objects. Now not only can you just map a single object, but you can create a hierarchy of mapped objects. The name mapping settings are stored by the Name Mapping project item.

  • Map object by values of their properties. To search an object that matches to the mapped name, TestComplete does not just use the object’s name, but also the object properties. That is, you can map objects by using not only the object name, but also by using object property values.

  • Use a new scripting object to access a mapped object. To address mapped objects in scripts, use the new NameMapping object. Using the object’s methods you can map and unmap objects from scripts.

  • Map objects from the Object Browser. Now you can map objects directly from the Object Browser.

Object Browser Improvements

The Object Browser has several improvements. Now you can --

  • Map objects to custom names directly from the Object Browser. You can assign the desired name to the object that is chosen in the Object Browser: just select Map the Object Name from the context menu. You can use this name later to refer to this object in scripts. See Name Mapping.

  • Show and hide system processes in the Object Browser using a new Show system process option.

  • Terminate processes from the Object Browser. You can terminate processes directly from the Object Browser by using the new Terminate Process item of Object Browser’s context menu.

  • Use a new option that specifies the object model to use. TestComplete 4 supports two models of tested objects: Flat or Tree. See Object Tree Models.

Changes in Local Variables

  • The changes in project structure make the Local Variables panel obsolete. To create, modify and delete local variables, TestComplete offers special pages in the project, project suite and network suite editors.

  • The scripting access to local variables has been changed. Since variables now belong to a project, project suite or network suite, they are accessed via their parent object. For instance:

    Project.Variables.MyVar1 = 10

    The Project.Variables property returns the program object that provides a scripting interface to local variables of the project item. The same object is used to address local variables of the project suite and network suite types. The object includes two methods that let you check whether a variable with the specified name is defined in the appropriate collection of local variables and to obtain a variable by its name, for example --

    Project.Variables.VariableByName("MyVar" + CStr(1)) = 10

Improvements in the Editing and Search Subsystems

  • Automatic revision marks. The Code Editor of TestComplete 4 automatically highlights the changed and saved lines of code providing better and easier tracking of changes. For more information on this, see About Code Editor.

  • Easier changing of routines within units. Using the enhanced Code Explorer panel, you can drag-and-drop routines between units, change the routine position within a unit, etc.

  • Background syntax check. The Code Explorer panel parses the source code during text editing and indicates whether a unit holds a syntax error. By a single click you can open the unit code on the issue line and fix the error. You can also request TestComplete to check the syntax of a unit, by right-clicking this unit in the Project Explorer panel and selecting Check Syntax from the context menu. See Checking Syntax.

  • Custom highlighting. The code editor of version 4 can now highlight any word you specify in the editor options. This enables you to highlight certain object and method names in script code (for example, Sys, Process, Window, etc). See User Keywords Options.

  • Search in any project file. Now you can search for text in any project file or panel, not just in the script code. The improved scripting engine supports regular expressions, wildcards and many other search options.

  • Code template parameters. The code templates may now have one or several parameters. TestComplete asks for parameter values every time you insert a template into your script code. See Code Templates.

  • Highlighted expressions. The script debugger now highlights the code expressions when you are moving the mouse cursor over them during the script debugging. For more information, see Evaluating Expressions.

  • National characters support. The Code Editor now supports the input of national characters. You can enter national characters in the same way as you do this in Notepad. For instance, to enter the o character with circumflex, type [o.

Changes in Options

All options and settings have been organized into three large groups:

  • TestComplete options. This group includes options that affect the IDE as well as the testing and recording process and are common for all TestComplete projects.

  • Project properties. This group includes settings that are specific to the project to which they belong. For instance, these settings specify the object tree model used by your TestComplete project or the procedure for handling unexpected windows. These settings can be modified with the project editor.

  • Default project properties. This group includes settings that are used by default for new projects created in TestComplete.

The new options concept lets you use different options for different projects. Use of project properties frees you from modifying settings in TestComplete dialogs and panels every time you open your project in TestComplete. In other words, project properties provides makes the work with several projects more flexible and convenient. For more information, see TestComplete Options.

Other Improvements

  • Earlier versions of TestComplete can compare only BMP images. In version 4 the range of supported image types has been extended. Now you can post to the log, save to stores, compare and find images of the BMP, JPEG, PNG, TIFF and GIF format (the GIF format is supported only if the GIF Extender plugin is installed). The Image Viewer window can also show images of any of these formats. You can create custom image adapters that will allow TestComplete to open, save, compare and find images having the format supported by the adapter.

  • Scripts recorded in previous versions of TestComplete hold two variables: p for processes and w for windows. Version 4 uses individual variable for each process or window. TestComplete 4 includes special algorithm that detects windows and processes used more than once in a script and creates variables for such windows and processes. All of these make the recorded code more readable.

  • Script playback can be paused at any moment.

  • TestComplete now supports recording and playback performed when the mouse is in left-handed mode.

  • Previous versions of the product always recorded an asterisk for window captions holding hyphens or the :/ substring. Version 4 includes a special option, Auto-correct window captions, that specifies whether the automatic correction should be performed.

  • TestComplete can now be integrated with source control systems, such as Visual SourceSafe, Team Coherence, CVS, etc. Using the items of the new File | Source Control menu, you can check your TestComplete project in or check it out from your source control system directly from TestComplete. You can also compare the project file with other files, view its history and use other services provided by source control systems. TestComplete supports all Microsoft SCC API compatible source control systems. For more information, see Integration With Source Control Systems via SCC API Providers (Legacy).

  • Now TestComplete automatically checks for updates at startup. This feature will help you ensure that you are using the latest version of TestComplete. You can also check for updates manually by using the new Check for Updates menu item. See How to Check for Available Updates.

  • Now you can run TestComplete under any user account, no matter under which account it was installed and registered.

    Note: To install TestComplete you should be working under a local computer administrator’s account. You can register TestComplete only if you are logged in as a power user or a local computer administrator.
  • In TestComplete 3, the Visualizer subsystem can only take screenshots during the DelphiScript run. In TestComplete 4 it supports all the scripting languages.

  • AQtime support has been improved. Version 4 includes a special AQtimeIntegration object that provides you with more control over AQtime: it lets you select the profiler, get results during the profiler run, attach to processes, etc. The slAQtime object that used to automate AQtime in earlier versions became obsolete. It is supported for backward compatibility only. See Integration With AQtime.

    TestComplete 4 does not include menu items for running AQtime projects (previous versions contained such items).

  • In previous versions you could create only one ActiveX control containing TestComplete project events. Now you can create any number of such controls.

  • The object properties stored into the Objects collection of the Stores project item can now be modified in a TestComplete panel and from scripts.

See Also

Version History

Highlight search results