Creating custom generators and categories from Data definitions

You can create custom generators and categories from existing Data definitions in HCL OneTest Server. After you add an existing generator in a field of a Data definition, you can customize the generator parameters that are displayed for the field. You can then save the customized parameters in the Data fabrication catalog as a new generator. You can also save the new generator either in an existing category or save in a new category.

Before you begin

You must have completed the following tasks:

Procedure

  1. Log in to HCL OneTest Server.

    The team space that contains your project is displayed.

  2. Click Active projects > My projects > project_name to open the project that contains the test assets.

    The Overview page of the project is displayed.

  3. Click Author > Data.

    The Data page and the Data navigator are displayed.

  4. Open a Data definition in the edit branch.
  5. Click a generator in the Generator column of a field where you want to customize the configuration.
  6. Perform any modification in the Generator dialog to customize the existing configuration of the selected field.
  7. Click Save to catalog to save the customized parameters in the catalog of the Data fabrication feature as a new generator.
    The Add new generator dialog is displayed.
  8. Enter a unique name for the new generator in the Name field.
    HCL OneTest Server uses the existing generator as the base generator. Therefore, the Base generator list is not editable.
  9. Perform one of the following actions to select the category of the new generator:
    • To select an existing category, go to step 10.
    • To add a new category, go to step 11.
  10. Perform the following steps to select an existing category:
    1. Select an existing category that is displayed in the Category list.
    2. Click Create.

      The new generator is added in the existing category and is displayed in the Catalog panel of the data definition.

  11. Perform the following steps to add a new category:
    1. Click Add new category in the Category list, and then click Next.

      The Add new generator dialog displays a new set of fields to capture more details about the new category.

    2. Enter a unique name in the Category name field where the new generator will be saved in the catalog of HCL OneTest Server.
    3. Select a color from the available range of colors so that you can identify the new category easily.
    4. Select the location to create the new category in the selected folder.

      For example, if you entered MyFolder/MyCategory in the Category name field, and then selected Location as the location to create the category in the folder, then the category is created under the Location/MyFolder/MyCategory path.

    5. Click Create.

      The new generator is added in the newly created category and is displayed in the Catalog panel of the data definition.

Results

You have created a custom generator using an existing generator from a Data definition. Also, you have learned to create a new category and save the custom generator under the category.

What to do next

You can save and publish the Data definition to the Git repository so that other members of the project can use the Data definition. See Publishing changes in an Edit branch.