Generating test data

When you have a defined and structured schema for the entire data, you can generate test data to perform application testing.

Before you begin

The following prerequisites must be met to generate the test data:

  • You must have created a project.
  • The schema must have a group type.
  • You must have a structured view of your defined schema.

About this task

You can generate the sample test data from the group type of a schema. When you import the XSD format schema, then HCL OneTest Data generates only XML test data. If you import JSON format as input, the application generates only JSON test data.


  1. Select your project in HCL OneTest Server and navigate to the Data Fabrication page.
  2. Click Schemas tab and select the schema for which you want to generate the test data.
  3. Select the group type that you want to use to generate the test data from the Dictionary dialog box.
  4. Click Generate Data from the menu.
    The Generate Data dialog box is displayed.
  5. Enter the number of records that you want to generate in the Number of records field.
    Important: When you select the pairwise data generation property for any item type, then the number of records you enter is ignored. Based on the pairwise data generation approach, HCL® OneTest Data autocalculates the number of records.
  6. Enter seed value in the Numeric Seed Value field.
    The seed value acts as an instance of random data that can produce the same set of data multiple times. By default, the seed value is blank.
    Note: The following table lists the maximum values for numeric seed value and number of records:
    Description Maximum values

    Numeric Seed Value

    8 digits (99,999,999)

    Number of records

    9 digits (999,999,999)

  7. Choose the output file format of the test data that you want to generate from the Output File Format list. HCL OneTest Data supports the following formats:
    • CSV
    • Native
    • JSON
    • XML
    • Excel
    • If you create a schema by using the schema designer, by default, the output file format is CSV.
    • If you import a schema into your project or have a schema with nested groups, you can select only the Plain text file as the output file format.
    • You can generate line numbers in the output by creating an auto-increment rule by using functions and expressions.
  8. Click OK.


The test data is generated successfully.
Note: The column headings for the generated test data are available only for the CSV and Excel file output formats.

What to do next

You can view and download the generated test data on the Jobs page. See Status of generated test data.