Running tests by using Data Fabrication

Starting from V10.0.2, if a test or schedule is associated with a dataset, you can replace the dataset at run time with the schema created from the Data Fabrication page.

Before you begin

You must have completed the following tasks:

About this task

In HCL OneTest Server, from the Data Fabrication page, you can create a schema that can be used while running a test or schedule that is associated with a dataset. For example, after the recording, a test is generated that captures interactions between the client and the server. When you run this test, it uses the same data that you used during recording. For example, if you want to test the application with random test data, you can override the dataset being used in the test or schedule with a schema that you created from the Data Fabrication page of HCL OneTest Server.

Whenever you generate test data to perform application testing, the generated data is different. You can produce the same set of data multiple times by setting the seed value. For example, you have used seed value as 1 to generate test data. When you run the test or schedule by providing the seed value as 1, the same set of data is used for testing instead of different data.
Note: You must ensure that the original dataset that is associated with a test or schedule and a schema that you have created have the same column names.

Procedure

  1. Initiate the test run on the Execution page.
  2. Create or pick a label for the test run to identify the run.

    After the run completes, the label is displayed against the run on the Results page.

  3. Click the DATA SOURCES tab and perform the following sub-steps:
    1. Select a schema to override the dataset that was associated with a test or schedule in the desktop client.
      Note: If the dataset and schema have the same column names, only then the Override drop-down list shows the existing schema names.
    2. Enter the number of records that you want to generate in the Number of rows field.
    3. Optional. Enter a seed value in the Seed value (optional) field.

      The seed value acts as an instance of random data that can be repeated if required. By default, the seed value is blank. Alternatively, you can use the up-down control button to increment or decrement the Number of rows and Seed value.

      Note: You must provide a value in the Number of rows field. Otherwise, you cannot run the test or schedule.
    Select the schema to override datasets
  4. Click Set, and then Execute.

What to do next

You can monitor a test run and check the logs to ensure that the data is taken from the schema instead of the dataset when running the test.