Integrating sample files into a schema

When you want to generate the test data, you must define a schema. HCL® OneTest Data provides sample files with item type values so that you can integrate the sample file into a schema by mapping it to any item type.

Before you begin

  • You must have logged in to HCL OneTest Server.
  • You must have created a project and a schema.

About this task

The Files tab on the Data Fabrication page is one of the design components of a project. From the Files tab, you can integrate a file into a schema by using any one of the following options:
  • Create a file by retrieving the data.
  • Upload a file from the local file system.
  • Use any sample file.
Sample files contain the values for a specific item type. The sample files are in CSV and Excel file formats. You can map these sample files to an item type in a schema.
Note: You can map only one sample file to one item type in a schema.
You can use the Search field to search for any specific sample file from the Sample Files list. After you select a sample file, you can use the menu to manage the file for the following actions:
  • Edit: You can modify the file name and the description of the selected sample file.
  • Delete: You can delete the selected sample file from the list of files you can view in the File tab.
  • Download: You can download the selected sample file into your local file system.
    Note: If you want to modify the selected sample file, you must first download the file into your local file system, and then edit the file for changes.

Procedure

  1. Select the project in Rational® Test Automation Server and go to the Data Fabrication page.
  2. Click Use sample from the Files tab.

    The Sample Files dialog box is displayed.

  3. Select one or more sample files that you want to import into your project, and then click Select.
  4. Click the Files tab, and then download the selected sample file that you imported into your project.
    Note: You can open the sample file and check the column number of the file that you want to map with the item type.
  5. Open your schema from the Schemas tab.
  6. Select Restrictions from the Item Properties drop-down list of the Properties dialog box.
  7. Enable the Values from file toggle button.
  8. Provide the file name of the selected sample file with an extension in the Values file field.
  9. Enter the column number of the sample file where the item type values are specified in the Values column number field.
  10. Click Save.

Results

  • You can view the list of all the sample files you have selected in the Files tab.
  • You have successfully integrated the sample file into a defined schema.

What to do next

You must prepare the structural view of the schema. See Designing a structural view of the schema.