Copying artifacts of a schema to another schema

When a schema in your project includes artifacts, and you want to reuse those artifacts in another schema in the same project, then you can copy the artifacts of a schema to another schema by using HCL® OneTest Data.

Before you begin

You must have a schema in your HCL® OneTest Data project.

About this task

While you copy the artifacts of the schema, you can either create a schema or select an existing schema.

Restriction: You cannot copy an XSD or a JSON schema to another schema.

Procedure

  1. Log in to HCL OneTest Server and open the team space that contains your project.
  2. Open your project.
    The Overview page is displayed.
  3. Click Author > Data Fabrication.
    The Data Fabrication page is displayed.
  4. Open your schema from the Schemas tab.
  5. Select a category, group, or item type from Dictionary, and then click Copy to Schema from the menu.
    The Copy Type dialog is displayed.
  6. Toggle the Create New Schema switch to select the destination schema. You can either create a schema or select an existing schema.
    • To copy the artifacts of a schema into a new schema, go to step 5.
    • To copy the artifacts of a schema into an existing schema, go to step 6.
  7. Copy the artifacts to a new schema by performing the following steps:
    1. Toggle the Create New Schema switch to the on position to create a schema.
    2. Enter a name for the new schema.
    3. Toggle the Copy Child Types switch to the on position to copy all the child types of the selected type.
    4. Toggle the Copy Referenced Types switch to the on position if you want to copy the types referenced as the components of the group.
      Note: The referenced types are always copied to the same path as the source schema.
  8. Copy the artifacts to an existing schema by performing the following steps:
    1. Toggle the Create New Schema switch to the off position to select an existing schema.
    2. Select a schema from the Schema drop-down list.
    3. Toggle the Retain Same Type Paths switch to the on position if you want to copy the types to the same path in the destination schema.
      Note: If you toggle the switch to the off position, then you must provide the type path in the Type Path field.
    4. Toggle the Copy Child Types switch to the on position to copy all the types and the child types of the selected type.
    5. Toggle the Copy Referenced Types switch to the on position if you want to copy the types referenced as components of the group.
    6. Toggle the Overwrite Existing Types switch to the on position to overwrite the type in the destination schema that already exists.
  9. Click Copy.
  10. Save the changes.

Results

You have successfully copied the artifacts of a schema into another schema.