Test data management

UK Test Data Guide for QA and Development

Good test data exercises realistic software behaviour without quietly turning a development environment into a copy of production. The right approach depends on what the test must prove and the risk attached to each field.

By · Published · Updated

UK Test Data Guide for QA and Development visual guide cover

Choose the least intrusive data that works

Start with fully synthetic or reserved examples for layout, length, error handling and unit tests. Use a real-world location only when the integration genuinely requires a geocodable or externally recognised address, and keep unrelated synthetic identity fields clearly separated from it.

The ICO's data protection by design and default guidance says organisations should consider privacy from the design stage and limit personal information to what is necessary for the purpose.

Separate environments and permissions

  • Keep development, integration, staging and production credentials separate.
  • Do not copy a production database into QA merely because it is convenient.
  • Restrict access to test environments and rotate any test-only secrets.
  • Ensure email, SMS, payment and fulfilment integrations use sandbox destinations.
  • Prevent test records from entering production analytics, CRM or identity systems.

Control logs, retention and exports

Generated combinations should be short-lived unless a repeatable fixture is required. Avoid logging full addresses, mailbox links or copied test payloads. Set a deletion period for fixtures and exports, and make sure backups do not retain data longer than the documented purpose.

When a map, email provider or external validation service is involved, treat that request as a data transfer and document which fields are sent. A convenient preview can still expose the selected value to a third party.

Test the controls as well as the happy path

GOV.UK quality-assurance guidance recommends testing normal and unusual conditions and confirming that changes do not break existing behaviour. Include rate limits, timeouts, malformed responses, inaccessible dependencies, duplicate records and suppression requests in automated tests.

  • Confirm API responses expose only approved fields.
  • Confirm test pages and endpoints use the intended indexing rules.
  • Confirm real messages, calls, mail and payments cannot be triggered.
  • Confirm errors do not leak storage keys, stack traces or source metadata.

Official references