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.

Procedure

  1. Select your project in Rational® Test Automation 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 a Group type and click the context menu.
  4. Click Generate Data.
    The Generate data dialog box appears.
  5. Enter the number of records that you want to generate and the seed value for reference.
    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)

  6. 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
    Notes:
    • 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.
  7. Click OK.

Results

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.