Modifying a Data definition

After you create and publish a Data definition in HCL DevOps Test Hub (Test Hub), you can modify the fields or the configuration of the generators in an existing Data definition when you want to change the structure of the test data.

Before you begin

You must have completed the following tasks:

About this task

You can modify a Data definition after you open it for editing. After you make the modifications, you can save the Data definition, and either preview or generate test data with the changed data structure. If you want to commit the changes you made to the Data definition, you must publish the changes to the project repository. When you publish the changes they become visible to other project members. This way, other project members can access and use from the updated Data definition. When you or other members of the project edit the same Data definition, you can view an icon with the initials of the member in the Data definition page.

The Changes page also lists the conflicting edits when another member publishes their edited Data definition first. When a member with conflicting edits tries to publish the edited Data definition, an error about conflicting changes is displayed. However, the member can use the Save as option in the Changes page to save and publish a copy of the Data definition with a different name. The member must then discard the edits that were made to the original Data definition.

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 > Data.

    The Data page and the Data navigator are displayed.

  4. Click the Data definition that you want to edit in the Data navigator.

    The selected Data definition opens in the Data page.

  5. Perform the actions that are listed in the following table to modify the Data definition:
    Modification Action
    Addition of new fields Click the Add field option, and then enter a name for the field in the Name column.
    Note: A new row with an empty field is automatically displayed below the row that you edit.
    Addition of generators in fields Drag a generator from the Catalog panel into a field under the Generator column.
    Note: You can use the Search catalog field in the Catalog panel to find the required generator.
    Replacement of generators in fields Drag a generator from the Catalog panel into an existing generator field under the Generator column. The existing generator in the field is automatically replaced by the generator.
    Modification of generator configurations Click a generator in the Generator column. The generator configurations are displayed. Modify the options and settings in the generator configuration.
    Note: If you modify the configurations of a basic generator, the changes are applicable only when the generator is used as field in a Data definition. The basic generator that is available in the catalog is not modified nor saved.
    Inclusion of additional configuration details Click the Add new configuration tab. Provide a name, and enter or select the other settings as an additional configuration to the generator.
    Arrangement of fields Drag and drop the field rows in the Data definition panel to rearrange the fields in the order you want.
    Deletion of fields Click the delete icon Delete icon in the row of a field to remove the field from the Data definition.
    Deletion of Data definition Click the Delete icon Delete icon in the Data definition panel to delete the Data definition from the existing location.
  6. Click the Save icon Image of the save icon. to save the changes made to the Data definition or the Save All icon Image of the Save all icon to save all changes made to different Data definitions by using the same Edit branch.
    Note: When you edit different files that include datasets or Data definitions simultaneously, you can select your action from the following options:
    To... Do this...

    Keep your current file open and close the open files on the right.

    Right-click, and then click the Close Tabs to right option.

    Keep your current file open and close the open files on the left.

    Right-click, and then click the Close Tabs to left option.

    Keep your current file open and close all the other open files.

    Right-click, and then click the Close Others option.

    Close all open file tabs.

    Right-click, and then click the Close All Tabs option.

    Note: The changes you made are only visible and available to you in the Edit branch. You must publish the changes in the Edit branch to the branch in the project repository for the changes to be visible to the other members of the project.
  7. Click the Publish icon publish_icon to publish the changes made to the Data definition to the branch in the project repository.

Results

You modified an existing Data definition in your project.

What to do next

You can generate test data by using the modified Data definition. See Generation of test data.