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 PostcodeLab · Published · Updated
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
Related developer guides
PostcodeLab Data Methodology and Sources
See how PostcodeLab selects UK postal records, separates synthetic identity fields, masks mobile patterns, handles removals and documents data limitations.
Read guideUK Address Form Test Cases and QA Checklist
Use practical UK address form test cases for field variation, postcodes, lookup failure, accessibility, mobile layouts, exports and integration safety.
Read guideUK Mobile Number Format for Test Data
Learn the domestic and international UK mobile number formats, Ofcom mobile ranges, masked test patterns and validation boundaries for developers.
Read guideUK Address Generator API for Testing
Try the free single-record UK address test-data API for QA, with a manual playground, JSON fields, masked mobile patterns, rate limits and safe examples.
Read guide