Recording Automated Tests

Applies to TestComplete 15.63, last modified on April 10, 2024

You can create automated tests quickly by recording actions in desktop, web and mobile applications. You can record data input, item selection, website navigation, form submission, mobile gestures and other user actions. You can also create checkpoints during test recording. You can record keyword tests, scripts, and low-level procedures.

After recording a test, you can review and edit it.

Starting, pausing and stopping recording

To start test recording, do any of the following:

  • Click Record Keyword Test or Record Script on the Test Engine toolbar.

  • Select Test > Record > Record Keyword Test or Test > Record > Record Script from the TestComplete main menu.

  • Click Record on the toolbar of the Keyword Test editor.

  • Click Record Test on the Start Page.

  • Press Shift+F1.

If no project is open, TestComplete will show the Record Test wizard that will guide you through creating and configuring a project for your test. Then TestComplete will start recording.

TestComplete will show the Recording toolbar where you control the recording process.

Recording toolbar

To pause recording, click Pause on the Recording toolbar or press Shift+F10.

To resume recording, click Record on the Recording toolbar or press Shift+F1.

To stop recording, click Stop on the Recording toolbar or press Shift+F2.

Tip: You can change the shortcuts in the Global Shortcuts dialog.

Appending recordings to the current keyword test

If you use keyword tests, you can append the recorded operations to existing tests instead of recording new tests:

  1. Open the test in the Keyword Test editor.

  2. Click Record on the editor’s toolbar.

    Appending recording to current test
  3. If TestComplete shows a message prompting you to specify where to append the recorded operations, click Add To End.

To append the recorded operations after a specific operation:

  1. Open the test in the Keyword Test editor.

  2. Select the operation after which you want to add the recorded operations.

  3. Click Record on the editor’s toolbar.

  4. If TestComplete shows a message prompting you to specify where to append the recorded operations, click Add To Current Position.

After recording has started

When you start recording, TestComplete:

  • Switches to the Recording mode and displays the Recording toolbar.

  • Minimizes the TestComplete main window (this depends on the Minimize TestComplete option, which is enabled by default).

  • Saves the changes made to the current project (this depends on the Save before recording option, which is enabled by default).

  • Creates a new script routine or keyword test where the test actions will be saved.

  • Turns off the Caps Lock key. TestComplete also turns off the Caps Lock key when starting a test run. This ensures that TestComplete will correctly simulate keystrokes.

  • Starts the tested applications that have the Autorun application on recording option enabled.

  • Displays the Mobile Screen window. This window is used when testing mobile applications (this depends on the Automatically display Mobile Screen when recording option, which is disabled by default).

Things that can be done during test recording

Besides recording actions in your tested application, you can do the following during test recording:

Recording the application start

TestComplete traces the start of applications during the recording. After the recording is over, TestComplete may add test actions that will automatically start these applications. Depending on the application’s type, this is done in different ways:

Desktop

See details

Web

See details

Mobile

See details

Changing the type of the recorded test

TestComplete can record tests as –

You start recording either a keyword test or a script, but you can switch to another test type at any time during recording. To do this, use the corresponding buttons on the Recording toolbar.

Selecting recorded test type

When you switch to another recording mode, TestComplete inserts a call to the new test into the previously recorded test so that these tests can be played back in sequence. For example, if you switch from keyword test recording to low-level recording, TestComplete will insert a call to the low-level procedure into the keyword test.

Default names of recorded tests

TestComplete automatically names new keyword tests and scripting routines. The name of a newly recorded test or routine looks like TestN, where N is a number. TestComplete generates a name that does not coincide with the names of the existing keyword tests or other routines in the scripting unit.

You can change the default name any time later. To rename a keyword test, use the Project Explorer. To rename a script routine, change its name in the Code Editor.

Recording various types of tests

Recording options and specifics

TestComplete has options that affect the recording process. To view or change them, you can do any of the following:

  • At design time, select Tools > Options from the TestComplete main menu and then select the Engines > Recording category.

  • During the test recording, click on the Recording toolbar.

For a full list of the options, see Recording Options Dialog.

For specifics of recording tests for different types of applications and UI elements, see Recording Specifics.

See Also

Testing With TestComplete

Highlight search results