Recording Specifics

Applies to TestComplete 14.40, last modified on April 22, 2021

This topic describes the specifics of test recording in TestComplete:

General

  • When recording a script or keyword test, TestComplete records user actions as actions on objects, not low-level events such as mouse movements or pressing and releasing mouse buttons and keys. That is, TestComplete does not record the precise mouse path and the delay between user actions, but it records mouse clicks and keystrokes that affect windows and controls. This object-oriented approach has several benefits:

    • It makes tests less dependent on the screen layout of windows and controls.

    • It makes the tests shorter and more readable.

    • The tests run faster than they were recorded.

    However, in TestComplete, you can record low-level events and actual delays between user actions. To learn more, see About Testing Applications in Low-Level Mode.

  • When TestComplete records user actions, it traces and records keyboard and mouse events that these actions generate. Depending on the tested application, the recorded action may differ from the action you performed during the recording.

    A typical example is that an application form can process keystrokes before they are sent to controls on this form. For instance, the form may handle a Space key press and select a radio button located on the form. In these cases, TestComplete will record the radio button selection rather than the Space keystroke.

  • TestComplete can map objects with which you interact in your tests. For each object, TestComplete creates an entry in the Name Mapping repository and specifies properties it uses to identify the object in the application uniquely. (To learn more about name mapping, see About Name Mapping). For mapped objects, TestComplete also creates aliases - custom names it uses to address objects in tests.

    Depending on whether the Map object names automatically setting is enabled or not, and on whether the object is already mapped of not, TestComplete will address the object in the recorded tests in the following ways –

    • If the object is already mapped: by the object’s alias or by its mapped name if the object does not have an alias.

    • If the object is not mapped:

      • If the option is enabled, TestComplete will map the object, create an alias for it and use the alias to address the object in tests.

      • If the option is disabled, TestComplete will use the object’s default name. The default name depends on the object type (process, window, control) and its properties (for example, its ClassName, Caption and so on).

  • By default, TestComplete does not record real delays between user actions. This speeds up the playback of the recorded tests. However, if you need to play back your tests with the same speed as they were recorded, enable the Real-time mode option before starting recording. For more information, see Recording Actual Delays Between User Actions.

  • While recording a test, you cannot switch to the TestComplete main window. If you try to do this, TestComplete will show an appropriate message and will automatically pause the recording. To continue recording a test, click Continue in this message. To stop the recording and switch to the TestComplete main window, click Stop.

Recording Keyboard Input

  • Depending on the Record text input into simple editors as option, TestComplete can record text input into single-line edit controls using either the SetText method or the Keys method. When TestComplete uses the SetText method, the recorded test operation specifies the final value of the edit control before you switch to another object or stop the recording. When TestComplete uses the Keys method, the recorded operation specifies the actual sequence of keys pressed to type in the edit control, including special keys like Backspace, Delete, Alt, Ctrl, F-keys, and so on.

  • If the Record text input into simple editors as option is set to SetText, TestComplete automatically saves the password you entered during test recording to project Password variables and masks password values in the recorded tests. This way, you can keep your password values secure in your tests.

    If your passwords are recorded as text stings and are not masked in tests, make sure the Tools > Options > Engines > Recording > Record text input into simple editors as option is set to SetText (the default value).

  • Regardless of whether the Record text input into simple editors as setting is enabled or not, for multi-line edit controls, TestComplete always records text input by using the Keys method.

  • Before TestComplete starts recording a test, it turns off the Caps Lock mode. It also does so before starting a test run. This guarantees that TestComplete will record and simulate keyboard input correctly.

Third-Party Software Conflicts

  • TenAsys INtime runtime is known to interfere with the TestComplete recording engine. As a result, TestComplete may record test operations in a wrong order. To avoid the issue, uninstall INtime from your computer or record tests on a computer without INtime installed.

Application Specifics

Test recording may depend on the type of your tested application. To learn more, see the following topics:

See Also

Recording Automated Tests
Recording Specifics (Desktop)
Recording Specifics (Web)
Recording Specifics (Android)
Recording Specifics (iOS)

Highlight search results