On the Variables page of the project and project suite editors, you can create, delete, or modify project and project suite variables. To open the page:
-
Double-click the project or project suite item in the Project Explorer panel. TestComplete will open the project or project suite editor.
-
In the editor, switch to the Variables tabbed page.
The image below shows the overall view of the Variables page of a project. The Variables page of a project suite looks the same:
The Variables page of the project editor shows variables of the project type, the Variables page of the project suite editor shows variables of the project suite type.
Depending on whether a variable value is stored between test runs or not, the Variables page has the following sections: Persistent Variables and Temporary Variables.
Each section lists variables of the appropriate type.
For each variable, the sections show the following information:
Column | Description | ||
---|---|---|---|
Name | Specifies the variable name.
|
||
Type | Specifies the type of the project or project suite variable.
The following types of variables are available in both the Persistent Variables and Temporary Variables sections:
Variables of the following types are available only in the Temporary Variables section because they do not preserve their values between test runs:
|
||
Default Value |
A project can be shared between several testers working on different workstations (see Using Test Projects in Shared Mode). The variable values are computer-specific. Using the Default Value column, you can specify the value that will be used when the project is opened for the first time on the remote computer. Default Value is stored in the project file and it is common for all computers for all testers that use the project. If you modify a value in this column, the resulting changes will modify the Default Value for all users who share the project with you.
The default value cannot be set or read for |
||
Local Value |
Specifies the current value of the variable. This value depends on the computer where the project has been opened. That is, the Value column holds the local value of the variable. The value of the Object type variables can only be set or read during the script execution and cannot be changed from the editor. The Local Value column displays {Object temporary variable [unassigned]} for these variables. |
||
Category | The category of the variable. This is a helper value like Description. It serves for more convenient working with variables. For instance, you can sort, filter or group the variables list on the Category column to see only variables of the desired category. | ||
Description | Any descriptive text related to the variable. |
You can arrange columns in the table using the customization capabilities provided by TestComplete.
Variables page toolbar
The Variables page toolbar contains the following commands:
Add Variable - Adds a new variable to the project or project suite.
Delete - Removes the selected variable from the project or project suite.
Working with the Variables page
To create a project or project suite variable
Click Add Variable on the appropriate section toolbar.
– or –
Right-click within the appropriate section of the Variables page and choose New Item from the context menu.
TestComplete will add a new row to the Variables table. You can then enter desired values into the table fields.
To modify a project or project suite variable
Click the cell you would like to change and edit the cell value using the in-place editor.
To delete a project or project suite variable
Select a variable you want to delete and then click Delete on the page toolbar.
– or –
Right-click the desired variable in the Variables page and choose Delete from the context menu.
You can also create, modify and delete project and project suite variables from scripts using the Project.Variables
and ProjectSuite.Variables
objects. For more information, see Working With Project and Project Suite Variables in Scripts.
See Also
Project And Project Suite Variables
About Project And Project Suite Variables
Working With Project and Project Suite Variables in Scripts