User Forms - Overview

Applies to TestComplete 15.0, last modified on November 17, 2021

This topic provides an overview of working with user forms in TestComplete. It contains the following sections:

About User Forms

In some cases, you may want your test to be flexible. For example, you may want to test some features of your application that were modified and skip those features that proved to work correctly to shorten test execution time. You may also need to enable or disable some options, depending on the results of the previous test run. Also, you may need to specify some test relative data, for example, paths to files or folders used during testing, and you may want these changes to affect only the current test run.

To achieve this, you can use local variables. However, TestComplete has a graphical solution - user forms. Instead of using a number of local variables to specify test options and control the test run, you can create a form and display it before or during the test execution. In this form, you can enter the needed test data and modify the test in other ways.

Of course, you can use these forms to output data as well. For example, during time-consuming operations, you can display an operation's progress in a form, or after the test is finished, you can display a form containing the test summary.

In TestComplete, you can create custom forms in the same way you do this in a form designer of any development tool. TestComplete provides you with a common set of components -- input fields, list boxes, radio buttons, checkboxes, and so on. It lets you customize the components as you wish -- arrange them within the form, change their size, style and so on. You can also create event handlers for form components in order to process events that are raised by them.

In order to use forms, you need to add the User Forms project item to your project. Each subitem of the User Forms project item corresponds to a single user form. To open a form in the editor, either double-click the desired form or right-click it in the Project Explorer panel and choose Edit from the context menu. To learn more about adding user forms to a project, see Adding User Forms to Your Project.

Sample

TestComplete includes a sample project that demonstrates how you can work with user forms:

<TestComplete Samples>\Common\User Forms

Note: If you do not have the sample, download the TestComplete Samples installation package from the https://support.smartbear.com/testcomplete/downloads/samples/ page of our website and run it.

Requirements

Support for creation of user forms is provided by default regardless of the TestComplete Modules you have installed.

If you cannot create user forms, choose File | Install Extensions from the TestComplete main menu and check whether the following plugins are active:

  • User Forms

  • User Forms Editor

See Also

User Forms
Installing Extensions

Highlight search results