Working With User-Defined Data Generators

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

Typically, you have to configure the desired generator each time you want to use it in your test. However, if you use the same settings in several variables or if you configure one generator in the same manner from time to time, it is recommended to create a user-defined generator that will be saved along with the TestComplete global settings and you can use it as in your test as any other generator.

Creating User-Defined Data Generators

To create a user-defined generator, do the following:

  1. Activate the desired generator. For more information on how to do this, see the generator’s description in the Generators section.

  2. Configure the generator as you wish. These settings will be used for the user-defined generator.

  3. Click Save to User-Defined below the Sample field.

  4. Specify the desired name for the created generator in the subsequent dialog and click OK to close it.

  5. TestComplete will automatically add the specified generator to the User-Defined category shown in the Data Generator list on the left. This generator will correspond to the standard generator with the settings specified before you clicked Save to User-Defined.

After you create a generator, you can use it as any other predefined generator and it will be available to any TestComplete project that is opened on your computer.

Deleting User-Defined Generators

If you do not need the created generator anymore, do the following:

  1. Select the desired generator in the User-Defined category shown in the Data Generator list.
  2. Click Delete to the right of the generator name. This will remove the generator from the list of the available generators.
Note: The Delete button is disabled for the standard (predefined) generators, so you cannot delete them.

Specifics of Using User-Defined Generators

When you create a user-defined generator, you should take into account the following:

  • If you click Cancel in the "Column_Name" Data Generator Parameters or in the Generate Data dialog, TestComplete cancels all the actions you have made since the dialog was opened. In other words, if you created a user-defined generator, modified an existing one or deleted a generator from the list and clicked Cancel, TestComplete will discard all the changes: the added generator will be removed, the changed generator will be rolled back to the previous state and the deleted generator will be restored.

  • The changes made in the "Column_Name" Data Generator Parameters dialog affect the currently created column and the columns that will be created afterwards. The previously created columns are not affected. In other words, if you modify a user-defined generator while configuring some column, the changes will not affect the same generator used by the previously created columns.

See Also

Using Data Generators
Data Generator Wizard
Generators

Highlight search results