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.
To create a user-defined generator, do the following:
Activate the desired generator. For more information on how to do this, see the generator’s description in the Generators section.
Configure the generator as you wish. These settings will be used for the user-defined generator.
Click Save to User-Defined below the Sample field.
Specify the desired name for the created generator in the subsequent dialog and click OK to close it.
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.
If you do not need the created generator anymore, do the following:
|Note:||The Delete button is disabled for the standard (predefined) generators, so you cannot delete them.|
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.