Overview of data fabrication

You can generate realistic and reusable test data in HCL DevOps Test Hub (Test Hub), to simulate real-world scenarios without using production data. This helps streamline test execution, enhance data privacy, and support automated testing at scale.

To use the data fabrication feature in Test Hub, you must be aware of the terms and concepts that are generally applied in data fabrication or test data generation.

Data definitions

Data definitions are fundamental building blocks that are used to define data structures and generate test data. You can use the data fabrication feature of Test Hub to create Data definitions and to specify the characteristics and attributes of the test data that you need for your testing scenarios. You can then use the Data definitions to generate synthetic test data that closely resemble real-world scenarios.

Catalogs and Generators

The Catalog page provides a structured overview of the available built-in generators and custom generators for a selected project. You can access the catalog for a project from Author > Catalog in the Test Hub UI. The catalog includes:

  • Basic Generators: You can select any generator from the available generators listed in the Catalog tab of a Data definition. The generators in turn contain different options and fields that generate data by using a built-in database in Test Hub. See Basic generators.
    Note: You must add at least one generator as a field in the Data definition to generate test data.
  • Custom Generators: Custom generators are modifications of the built-in generators that you modify any or all the fields in a generator to suit your specific requirements of your test data. The modified generator cannot be saved to the built-in generator and hence, you must save them as custom generators by providing a name to identify the custom generator. See Management of custom generators.
  • Custom Categories: You can create a custom category in the catalog to contain the custom generators that you create. See Management of custom categories.

After you add the generators to the Data definition, you can save the Data definition. See Saving a data definition by adding basic generators with their default settings.

Database Query

In addition to using generators, Test Hub provides a Database Query option under Data tab. This feature allows you to fetch test data directly from a connected database using custom SQL queries. It is useful when you need to reference actual database structures or utilize existing datasets instead of synthetic ones.

You can preview and validate query results before incorporating them into your test workflows, allowing for more dynamic and integrated test data management.

Schema

The schema feature in Test Hub complements data fabrication by allowing you to define how test data is structured, related, and managed. See Management of schemas.

You can:

  • Create schemas from scratch or connect to an existing database.

  • Use schema views to visualize data structure and relationships.

  • Link fabricated data with schemas for more contextual and relational test scenarios.

Using the data fabrication feature

You can find the flow of the different tasks that you can perform to fabricate test data. See Task flow: Generation of test data.

To begin with you must create a Data definition or an entity that contains the fields for each type of data.
Important: Test assets or resources cannot be created or edited directly in a branch of the project repository. A temporary branch of the branch in the repository called the Edit branch must be created as a container for assets or resources while you work with them. The contents or changes made by using the Edit branch must be committed or published to the branch in the project repository, which merges the changes to the branch in the repository and removes the Edit branch.

You can generate test data by using the default settings of the basic generators that you added to a Data definition. See Generating fabricated test data. Generated test data is saved as Comma-Separated Values (CSV) files, which you can use to replace existing datasets at test run time.

You can modify the default options and field values of a generator to meet specific requirements of test data but only after the generator is added to a Data definition. These modifications apply exclusively to the Data definition in which they were made. Built-in generators themselves cannot be changed or overwritten, and modified versions cannot be saved in the Basic generators section of the Catalog. See Saving a data definition by adding basic generators with their modified settings.

By combining data definitions, generators, database query and schemas, Test Hub helps you to create realistic, privacy-compliant, and reusable test datasets that improve test coverage and accuracy.