Creating a dataset by using data fabrication

When you create a schema to generate different types of data by using data fabrication, you can use that schema to create a dataset in HCL OneTest Server.

Before you begin

You must be a member of the project with the Owner or Tester role, and you must have completed the following tasks:

About this task

In HCL OneTest Server, from the Data Fabrication page, you can create schemas that can be used to create a dataset.

For example, after you record a test, the test captures interactions between the client and the server. When you run the test, it uses the same data that you used during the recording. When you want to test the application with random test data, you can create the dataset by using a schema that you created from the Data Fabrication page of HCL OneTest Server.

When you want to create or modify any dataset, you must have an edit branch. You can create the edit branch during the creation of dataset. All your dataset reside in the edit branch until you publish or discard the changes.

After you create the dataset, you can either publish your changes to a remote Git repository or you can discard the changes made to the dataset. The edit branch automatically disappears from the Branch list as well as from the remote Git repository and sets the global branch to the previously selected branch in the following conditions:

  • When you publish changes to the remote Git repository.
  • When you discard the changes made in the dataset.

Procedure

  1. Log in to HCL OneTest Server if you are not already logged in.
  2. Open a project from the team space.
  3. Go to Author > Datasets, and then select the Branch from the list where you want to store the dataset.
  4. Click Create dataset.

    Based on the Branch that you selected, the following window is displayed:

    • Edit Branch - If you selected other than the edit branch.

    • Create dataset – If you selected the edit branch.

  5. Perform one of the steps described in the following table to select or create the edit branch:

    Step description

    Step no

    To select the edit branch

    Perform 5.a

    To create the edit branch

    Perform 5.b
    1. Perform the following steps to select the edit branch:
      1. Choose the edit branch from the Select branch drop-down list if the edit branches are already existing.

      2. Click Ok.

    2. Perform the following steps to create the edit branch:
      1. Select Create new branch.

      2. Provide a name for the edit branch.

      3. Click Save.

  6. Enter a name for the dataset in the Asset name field.
  7. Select the place where you want to save the dataset in the Location field, and then click Next.
  8. Choose Fabricate data from the Select source list.
  9. Select a schema for data fabrication from the drop-down list.

    The list displays schemas that you have created only in your project.

  10. Enter the number of rows that you want to generate in the Number of Rows field.
  11. Enter a seed value in the Seed (optional) field.

    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 the seed value as 1 to generate test data in a dataset. When you want to create another dataset with the same set of data instead of different data, then you can provide the seed value as 1 during the creation of the dataset.

  12. Enable Fabricate headers by using the toggle icon if your schema contains the headers.
  13. Click Create.
    The new dataset opens in a CSV Editor in a web browser. The dataset created is listed on the Datasets page.

Results

You have created the dataset by using the fabricate data in your project.

What to do next

You can perform the following tasks:

  • Add, modify, or remove data in the dataset. See Editing a dataset.

  • Publish the dataset to the Git repository so that other members of the project can use the dataset. See Publishing a dataset.