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. Select your project in Rational® Test Automation Server and go to the Data Fabrication page.
  2. Open your schema from the Schemas tab.
  3. Select a category, group, or item type from Dictionary, and then click Copy to Schema from the menu.
    The Copy Type dialog box is displayed.
  4. 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.
  5. 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.
  6. 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.
  7. Click Copy.
  8. Save the changes.

Results

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