How to Create, Rename and Delete Data Groups

Applies to TestComplete 15.52, last modified on June 06, 2023

The object-driven testing (ODT) functionality is deprecated. Do not use it to create new tests. It will be removed from the product in one of the future releases. As an alternative, you can create custom classes in your scripts. For more information, see Alternatives to the ODT functionality.

To create a new data group

  1. Right-click the ODT | Data item in the ODT editor or the Data item in the Data editor.
  2. Select New Item from the context menu.
  3. TestComplete will create a new object group and name it NewGroup1. You can then rename the group as you wish.
Names of data groups are used for referring to data groups in scripts and keyword tests. That is why these names must consist of the A..Z, a..z, 0..9 and _ characters only (that is, they must be valid identifiers in the scripting language you use). The data group names are case-sensitive in JScript, C++Script and C#Script scripts, and case-insensitive in VBScript and DelphiScript scripts.

To rename a group

  1. In the ODT or Data editor, right-click the object group that you want to rename and select Rename from the context menu, or choose the desired group in the tree view and press F2. TestComplete will activate an in-place editor.
  2. Enter the desired name for the group.
  3. To apply changes, press Enter or click somewhere outside of the in-place editor. To cancel changes, press Esc.

To copy and paste a group

You can copy and paste data groups within a project or between different projects. The group is copied along with all of its variables and subgroups.

To copy a group to the clipboard:

  • Right-click the desired data group in the ODT or Data editor and choose Copy from the context menu.

To paste a group from the clipboard:

  • In the editor select the parent group for the new group, right-click on it and choose Paste from the context menu.

When copying data groups between projects, remember the following:

  • To paste a group object based on a particular class, you should declare this class in the target project. See How to Create, Rename and Delete Classes for instructions on this.
  • As the routines declared in the source project could not be found in the target project, you should redefine the routine names that are called as object methods, or copy these routines code from the source project.

To change the group’s position

You can change the order in which the objects are "walked" down during testing. You can rearrange the groups that belong to the same level of hierarchy. Rearranging the objects structure, filtering and disabling objects are three different ways to modify the execution flow of an object-driven test. To move a data group:

  • Right-click the desired group name in the editor and choose Move Up or Move Down from the context menu to move the group in the corresponding direction.

To delete a group

  1. In the ODT or Data editor, right-click the group you want to delete and select Delete from the context menu.
  2. TestComplete will display a message box asking you if you want to delete the selected group. Click OK to delete the group, or Cancel to cancel the deletion.
Note: When you delete a group, all variables that belong to this group are also deleted.

See Also

Object-Driven Testing
ODT Editor
Data Editor
How to Create, Rename and Delete Classes

Highlight search results