Applies to TestComplete 14.10, last modified on June 5, 2019

The Variables page of the Keyword Test editor is used to create, delete or modify keyword test variables. These variables parameterize operations and pass data from one operation to another during the test run.

The following image demonstrates the overall view of the Variables page:

Variables page of the Keyword Test editor

Click the image to enlarge it.

Information on the Panel

The page is a table that provides information about the variables. Each row in this table corresponds to a single variable. Table columns show properties of this variable:

Column Description
Name Specifies the variable name.
Note: The variable name is used to address the variable in scripts, so it must match the naming rules of the scripting language used in your project. The easiest way to follow this rule is to enter a name that consists of only alphanumeric or underscore characters and starts with a letter.
Type Specifies the variable’s type. The following types are possible:
  • Boolean - The variable can store Boolean values.

  • Double - The variable can store floating-point values and dates.

  • Integer - The variable can store integer values.

  • String - The variable can store string values.

  • Object - The variable can store object references. You cannot specify values of these variables from the editor.

  • Password - The variable stores encrypted strings.

  • Table - The variable stores a two-dimensional array of values.

    The Keyword Test editor also displays table variables on the editor’s Test Steps page under the operations tree.

  • DB Table - The variable stores tabular data from an external storage (a file or a database).

Default Value Specifies the value that will be assigned to the variable when the keyword test starts.
Note: Object variables cannot have default values; they can only be initialized in tests.
Category The category of the variable. This is a helper value like Description. It allows you to sort, filter or group the variables list on the Category column to see the variables of a desired category.
Description Any descriptive text related to the variable.

You can arrange columns in the table using the customization capabilities provided by TestComplete.

Working with Variables

Creating New Variables
  • Right-click within 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 the desired values into the table cells.

Modifying Variables
  • Click the cell you would like to change and edit the cell value using the in-place editor.

Deleting Variables
  • Right-click the desired variable in the Variables page and choose Delete from the context menu.

Note that you can also create, modify and delete variables directly from your tests using the KeywordTests.TestName.Variables object.

See Also

Keyword Testing - Overview
About Keyword Test Editor
Keyword Test Variables

Highlight search results