Skip to main content

Generate test data

Use NineData Data Generation to create database test data that follows realistic business rules. The feature helps development, QA, and performance teams prepare test environments without copying production data.

Why Realistic Test Data Matters

Random strings are often enough for simple load tests, but they are usually not enough for application testing. Realistic test data helps teams validate:

  • Query performance against representative data distribution and index usage.
  • Business logic that depends on meaningful values.
  • Relationships between tables, such as users, orders, and order items.
  • Edge cases that are difficult to reproduce with purely random data.

Capabilities

NineData Data Generation supports:

  • Predefined generation rules: Built-in rules cover common business fields, and you can create custom rules when needed.

    Data generation rules

  • Configurable data volume: Generate the required number of rows within the limits set by your SQL development policies.

    Configure generated data volume

  • Automatic field matching: Recognition rules can associate generation rules with matching database fields.

    Automatic field rule matching

    Matched generation rules

Prerequisites

Before you generate test data, make sure that:

  • The target data source and database have been added to NineData.
  • You have permission to create and execute a data generation task.
  • The target table structure is ready.
  • Your organization has confirmed the allowed generation volume and execution policy.

Generate Test Data

The example below generates 1,000 rows of test data for an account table.

  1. Open the data generation task page.

  2. Select the data source, database, and table.

  3. Configure a generation rule for each field.

    Configure generation rules for table fields

  4. Select Configure Algorithm to adjust detailed options for each rule.

    Configure a generation algorithm

  5. Set the generated data volume.

  6. Select Preview to review sample output and confirm that the generated values match your expectations.

    Preview generated data

    Preview generated account data

  7. To generate related data across tables, use the Foreign Key Constraint rule for foreign key columns. NineData can randomly select values from the associated primary key column and use them in the current table.

    Generate data with a foreign key constraint

  8. Execute the task after you confirm the configuration.

Result

NineData writes the generated rows to the selected table. Use the preview, task details, and SQL Console to verify that the generated data volume, field values, and table relationships meet your test requirements.

Next Steps