Creating a custom generator

You can create custom generators in addition to the existing generators in the HCL DevOps Test Hub (Test Hub) catalog. You can customize the existing generators and save them as new custom generators to help you create complex real-world scenarios for synthetic data generation. Additionally, custom generators enable the generation of data for specialized fields or domains that may not be readily available in standard datasets.

Before you begin

You must have completed the following tasks:

Procedure

  1. Log in to Test Hub.

    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 > Catalog.
    The Catalog page is displayed.
  4. Select the branch where you want to store the data generator from the Branch list.
  5. Perform one of the following actions to open the Add new generator dialog:
    • Perform the following actions to use the base generator:
      1. Click a generator from the Basic category that you want to use as the base generator.

        The Generator dialog is displayed.

      2. Click the Customize icon .
    • Click the icon in the Catalog page, and then click Add new generator.
    Based on the selected Branch, the following dialog is displayed:
    • Edit Branch: If you selected a branch other than the Edit branch.
    • Add new generator: If you selected the Edit branch.
  6. Perform one of the following actions in the Edit branch dialog, if you selected a branch other than the Edit branch:
    Action Steps Result
    Select an Edit branch
    1. Select an Edit branch from the Select branch list if the Edit branch already exists.
    2. Click Ok.

    The Add new generator dialog is displayed.

    Create an Edit branch
    1. Select Create new branch.
    2. Enter a name for the Edit branch.
    3. Click Save.

    The Add new generator dialog is displayed.

  7. Enter a unique name for the generator in the Name field of the Add new generator dialog.
  8. Select a built-in generator from the Base generator list.
    Test Hub displays only the built-in Basic generators as the base generator.
  9. Perform one of the following actions to select the category of the new generator in the Category list:
    • 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, if any, that is displayed in the Category list.

      Note: You cannot create a new generator in the Basic category. Therefore, the Basic category is not displayed in the Category list.
    2. Click Create.

      The new generator is added under the existing category of the Catalog page.

  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 category 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 Test Hub.
    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 page.

Results

You have created a custom generator in addition to the existing generators of the Test Hub catalog.

What to do next

You can perform any of the following tasks: