Considerations for Creating Tests

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

There are two basic ways to create tests with TestComplete. The easiest one is to record tests. You simply record user actions in the form of scripts, keyword tests or low-level procedures and then use the recorded tests to test applications and web services. The other way is to create tests by using special TestComplete editors. This topic contains some considerations on creating tests using these approaches.

Recording Tests

Recording of any TestComplete test always starts with recording a keyword test or a script. You can start recording scripts and keyword tests in several ways (see Starting, Pausing and Stopping Recording). Each of these ways switches TestComplete to the recording mode and displays the Recording toolbar on the screen. Using this toolbar, you can control the recording process and perform additional actions during the recording. For example, using the toolbar's items, you can pause or stop the recording, run the tested application or create checkpoints.

For details about recording tests, see Recording Automated Tests.

Creating and Modifying Tests

To create tests visually or change the recorded tests, use special test editors. They let you change the order of operations or test events, edit their parameters, insert and delete operations or script lines, and so on.

To create and change keyword tests, use the Keyword Test editor. It lets you visually add and delete test operations, change their order in the test and modify their parameters. Using the Keyword Test editor’s pages, you can also specify test parameters and create keyword test variables, which can be used to pass data from one operation to another.

To write script code manually or modify a recorded script, use the TestComplete Code Editor. It provides advanced features for writing and editing script code: syntax color highlighting, code completion, navigation among script routines, bookmarks, and so on. To debug script code, you can use conditional breakpoints, evaluate and watch dialogs and some other means provided by TestComplete. For more information on editing scripts with the Code Editor, see About Code Editor.

Besides these two editors, TestComplete includes many other test editors. You will work with them when creating tests of auxiliary types: distributed tests, unit tests, and others.

Importing Existing Tests

If you have already recorded or created a test in some other project, you can import it from that project to your current project. This is easier than creating the test anew. However, keep in mind that if you modify the imported test in the current project, it will be changed in the original project as well. To learn more about importing existing tests, see Importing Tests.

See Also

Recording Automated Tests
Creating and Recording Keyword Tests
Script Tests
Creating and Recording Low-Level Procedures
Adding Unit Tests to Test Projects
Importing Tests

Highlight search results