# Test Data Generation Methods Compared

> Choose between seed scripts, masking and subsetting, and synthetic data generation for QA, integration tests, and realistic relational workloads.

Canonical: https://subsetra.com/test-data-generation-methods
Language: en

Compare test data generation methods

Choose a method based on what your test needs to reproduce, which data it can access, and how often the environment must be rebuilt.

## Which method fits your test?

| Method | When to use it | What to check |
| --- | --- | --- |
| Seed scripts and fixtures | You need a small, repeatable set of records for a known behavior, such as a failed payment. | Write parent rows first or let your test factories create them. Update scripts as migrations change. |
| Masking and subsetting | You need a selected set of existing scenarios and have authorization to process the source data. | Review sensitive fields and keep the related rows required by each selected record. |
| Profile-based synthetic generation | You need fresh test databases with multiple related tables, where generation can run from an approved profile. | Validate foreign keys, table ratios, and the business rules your tests exercise. Add fixtures for rare cases. |

## Evaluate each method on the same task

Pick one workflow that matters to your team. For example, test what happens when a customer with several orders requests a refund. Identify the related tables and the exact record a test must find.

- Load the data with constraints enabled. Check for missing parents, duplicate keys, and unexpected nulls.
- Run the same integration test against each candidate. Include a named fixture for the exact edge case.
- Rebuild the database from scratch and record the steps, access requirements, and time to a queryable database.

## See a generated database before booking a demo

Lyrebird profiles a source database once with read-only access. Later generation runs from the saved profile on your own infrastructure.

The public [Pagila example](/lyrebird/samples/pagila) shows the source and generated tables side by side. Use the [synthetic data quality guide](/blog/validate-synthetic-data-quality) to see what was checked and how to validate the cases that matter to your team.

For a demo, tell us your database engine and the test you want to run. We can walk through the applicable workflow and the checks you can use to evaluate it.

- [Book a demo on your schema](https://subsetra.com/request-demo)
- [Explore the Pagila sample](https://subsetra.com/lyrebird/samples/pagila)

## FAQ

### Can a team combine seed scripts and synthetic data?

Yes. Use the generated database for scale and relationships, then add a small fixture for the exact scenario an assertion depends on.

### What should I bring to a test data demo?

Your database engine, the tables involved, and one test scenario are enough to start the discussion. Share any confidentiality requirements before sharing a schema.
