Production Data in Software Testing: Purpose and Erasure
Production data in test and staging systems: purpose limitation, data minimisation, pseudonymisation, access controls and documented erasure under the GDPR.
Mag. Bernhard Brandauer, Austrian attorney-at-law
BRANDAUER Rechtsanwälte
Mag. Bernhard Brandauer advises businesses on the legal classification and practical implementation of data protection requirements.
Production data can appear convenient in software testing because it reflects real processes. Processing data in development, quality assurance or staging still requires a specific purpose, a limited data set and controlled access. Copying data from production must not become an automatic routine.
This article explains how businesses select test data, remove or pseudonymise personal details, assess external environments and document the end of testing. It focuses on purpose limitation, data minimisation, security and erasure under Articles 5, 25 and 32 GDPR. General technical and organisational measures, production access to employee data and a separate AI DPIA are distinct questions.
Are production data ready for your software test?
Answer the questions about purpose, data scope and access. The result shows which documents may be missing before data are copied into test or staging systems.
Is the specific testing purpose documented?
Describe the function being tested and why personal data should be required for it.
Your orientation
The test data set is still too extensive.
The environment or access rights need improvement.
The test end and erasure are not sufficiently set.
The essential test-data controls are prepared.
Set the testing purpose and legal basis
Article 5(1)(b) GDPR requires personal data to be collected for specified, explicit and legitimate purposes. A business must therefore explain which function is being tested and why production data are needed. “For development” does not describe the operation sufficiently. A specific defect, interface comparison or migration test can require different data.
Copying data into a test environment is a separate processing step. The production legal basis does not automatically cover it where the purpose, recipients, safeguards or reasonable expectations change. Assess the testing purpose together with the original processing and the information given to data subjects.
Article 6 GDPR requires a valid legal basis. Special categories of personal data also require the additional assessment under Article 9 GDPR. Technical convenience does not replace purpose limitation or necessity. The existing article on reviewing new software before rollout addresses the risk threshold for new technology and remains separate from this specific test-data question.
Reduce and pseudonymise data before copying
Article 5(1)(c) GDPR limits personal data to what is adequate, relevant and necessary for the purpose. A test often needs a few realistic cases, not the complete production database. Review fields, records, periods and status values one by one. Remove information that has no role in the function being tested.
Synthetic data may be preferable where they reproduce the test case reliably. Where they do not, consider masking, generalisation or pseudonymisation. Pseudonymised data remain personal data if additional information can restore the link to a person. The safeguard lowers risk but does not replace a legal basis, access controls or an erasure plan.
Record who selected the data, which fields were removed or altered and why particular values remain. A repeatable export rule is easier to control than a manual database dump. Review every new test version for additional fields or records entering the environment.
Limit access to the test environment
A test environment is not outside data protection law. Article 25 GDPR requires data protection by design and by default. Article 32 GDPR requires security appropriate to the risk. Separate test and production technically, organisationally and through administrative accounts. A developer investigating a defect does not automatically need every field.
Record the roles of development, quality assurance, business teams, external support and system administration. Define which information each role may see, how long access lasts and whether activity is logged. Check hidden copies in local workstations, tickets, screenshots, logs and export folders.
Test data containing health details, financial information, credentials or children’s data require particular care. A smaller and more restricted test set may be necessary. The article on documenting technical and organisational measures is a useful complement. It does not replace the specific review of the test environment.
Review providers, support and data flows
Many tests run with a cloud or software provider. Establish whether the provider acts as a processor under Article 28 GDPR or decides purposes independently for a particular activity. The agreement should cover test data, support, subprocessors, storage locations, access and erasure. A general security promise does not answer the specific test configuration.
Map the flow from production through export to the test instance. Include temporary storage, backups, monitoring, error messages, support tickets and provider copies. Support access from a third country may also require a Chapter V GDPR assessment. A location statement alone does not show who can access the data.
The article on roles in SaaS agreements helps classify controller and processor. For testing, it is also essential to check whether promised deletion and access restrictions are actually configured and verified.
Evidence the test end, rollback and erasure
Article 5(1)(e) GDPR requires storage limitation. Testing must therefore have an end point instead of continuing indefinitely because the environment remains technically available. Set an end date or trigger before export. In a multi-stage project, assign responsibility and an evidence trail to each test set.
Erasure must cover known copies: database, file system, exports, local working copies, tickets, screenshots, logs and provider environments. Backups raise additional questions depending on the system and restoration process. They do not remove the need to review active test environments. Article 17 GDPR matters where an erasure request or the end of purpose affects continued storage.
A useful record identifies the data set, erasure method, time, responsible person and result. The record itself should contain only what accountability and control require. Test rollback with a safe copy or controlled case so that an erasure routine does not first fail under pressure.
Document approval and accountability
Article 5(2) GDPR requires the controller to demonstrate compliance. Article 24 GDPR connects that responsibility with suitable measures and review of their effectiveness. The approval file should bring together purpose, legal basis, data categories, selection rule, recipients, environment, roles, safeguards, test end and erasure check.
Add relevant records to the processing register under Article 30 GDPR where the test is a separate activity or a material change. A new data scope, provider, period or user group requires a fresh assessment before additional data are copied.
A DPIA under Article 35 GDPR may be required where processing is likely to result in high risk. This article addresses the narrower question of limiting and erasing production data in testing. The risk assessment remains separate and cannot be replaced by a short test approval.
Common errors with production data in tests
The complete production export is copied: Unneeded fields, old records and sensitive attachments enter the test environment for one test case.
The purpose remains general: “Development” or “quality assurance” does not explain the function or why personal data are necessary.
Pseudonymisation is treated as anonymisation: A key or additional information still permits attribution and the GDPR continues to apply.
Developer accounts receive broad access: Test, production and administrative permissions are not properly separated.
The provider is assessed only by location: Support, subprocessors, logs and remote access remain unchecked.
The end date is only a calendar entry: Copies, exports and backups are not included and the evidence is unclear.
Practice check before copying production data
Start with a short process description. Which function is being tested, which defect case should be reproduced and which fields are essential? Then choose between synthetic data, reduced production data and pseudonymised data. Explain the remaining link to individuals.
Before export, check the legal basis, information, recipients and provider role. Set roles, access rights, logging, storage location and transfer channel. Confirm that the test environment cannot open a wider connection to production than the purpose requires.
Before testing starts, set the end point, erasure and responsibility. After rollback, check active systems and known copies. Keep only a concise record. Repeat the review before copying additional data after a change.
Questions about production data in software tests
May a business copy production data for a software test? +
Are pseudonymised test data no longer personal data? +
How long may production data remain in a staging environment? +
Must local developer copies also be erased? +
Does every software test require a DPIA? +
Review software use and data protection together
New software and AI before rollout
Assess the risk threshold and DPIA question for new technology.
Technical and organisational measures
Document safeguards, roles and evidence for processing activities.
SaaS roles and agreements
Separate controller, processor and the provider’s own purposes.
Processors and service providers
Review data flows, instructions and subprocessors with external providers.
Prepare production data for software testing
We review the testing purpose, data scope, legal basis, pseudonymisation, roles, provider, access, test end and erasure control with you. The function description, planned export, system overview, provider documents and erasure plan support the first assessment. This shows which data are really needed and how rollback can be evidenced.
Discuss your data protection matter
Tell us briefly what is happening. We will help classify the situation and discuss which documents and next step are useful for your business.
Clarify a data protection question
Address
BRANDAUER Rechtsanwälte GmbH Giselakai 51 5020 Salzburg Österreich
Phone
+43 662 6280000