Test data and environments in pipelines
A pipeline needs a fresh place to test and known data to test with. Build both for each run, check they match the real setup, and throw them away after.
L1–L4 are part of the Pro pass
L0 Explain simply
Analogy: a pop-up kitchen. A pop-up kitchen arrives at an event fully stocked. The cooks know exactly what is on the shelves. When the event ends, the kitchen is cleaned and packed away. The next event starts the same way, with nothing left over from the last one.
Daily List is a to-do list app. Each time the pipeline tests a change, it builds a fresh copy of the app. It fills a small database with made-up users and tasks, runs the tests and then throws the copy away.
The fresh copy is a . The made-up users and tasks are . Controlling initial state reduces failures from leftovers. A new failure still needs investigation: the clock, external services, credentials, configuration or test itself may have changed.
The picture has a limit. A pop-up kitchen is cooked in by people on one day. A pipeline may build and clear its kitchen many times in an hour.
(SYNTHETIC / TRAINING ONLY: Daily List and every person named in this lesson are invented.)
PICTURE IT
The picture is the one the lesson above opens with. The table below shows how each part of it matches the software.
THE REAL JOB Building a fresh test place with known data for each run, matching the real setup, then throwing it away.
- Build fresh
- Seed known data
- Run the tests
- Throw it away
HOW THE PICTURE MAPS
| In the picture | In the software |
|---|---|
| The stocked pop-up kitchen | A fresh environment with seeded data |
| The same layout every event | Environment parity |
| Cleaning up after the event | Throwing the setup away |
| Leftovers from last time | Old data that breaks tests |
WHERE THIS PICTURE STOPS
- A pop-up kitchen is built once a day. A pipeline may do it many times an hour.
- A cook can see leftovers. A test can only fail in a strange way.
- A kitchen needs no secrets. A pipeline holds passwords and must guard them.
HOOK
Fresh, known, matched, gone.
REMEMBER IT THIS WAY
A rule of thumb: if you see this, think that.
If a test fails in a fresh copy with known data, usually look at the change, not at leftovers.
| In the trick | What it stands for |
|---|---|
| Fresh copy | A disposable environment built each run |
| Known data | Made-up users and tasks |
| Leftovers | Old data that breaks tests |
It misleads when the fresh copy is set up differently from the real one, so a fault can hide or appear.
TELL A FRIEND
A pop-up kitchen: stocked at the start and cleared after, so each event starts the same.
OFTEN MIXED UP WITH Where tests run in a pipeline. The pipeline lesson shows where each test sits. This lesson shows the place and the data that each of those tests needs.
Sources & standards — 1 source
- Market practice
Synthetic data ethics — confidentiality and privacy ↗ — UK Statistics Authority · Confidentiality/privacy discussion,19 October 2022; actual page opened 6 November 2026. Synthetic generation is not automatic anonymity.
Publisher primary source opened and relevant sections read on 6 November 2026 for the Agile/DevOps domain analysis. Original explanations are used; no extensive source text is copied.
PRACTISE AND KEEP
Sources for this topic — 11 sources
- Market practice
Dev/prod parity (The Twelve-Factor App) ↗ — Adam Wiggins · Dev/prod parity: keep the time, personnel and tools gaps between development and production small (search excerpt, page not opened)
Found through a web search; the page was not opened (search excerpt, page not opened). Version: Web page, no edition number. Licence terms were not read, so put it in your own words and do not quote it. Open the page and confirm what it says before relying on any detail.
- Market practice
III. Config (The Twelve-Factor App) ↗ — Adam Wiggins · Config is whatever changes between deploys; store it in the environment, not in the code (search excerpt, page not opened)
Found through a web search; the page was not opened (search excerpt, page not opened). Version: Web page, no edition number. Licence terms were not read, so put it in your own words and do not quote it. Open the page and confirm what it says before relying on any detail.
- Market practice
docker compose down (Docker Docs) ↗ — Docker · docker compose down removes the containers and networks; volumes are removed only with the --volumes flag (search excerpt, page not opened)
Found through a web search; the page was not opened (search excerpt, page not opened). Version: Web page, no edition number. Licence terms were not read, so put it in your own words and do not quote it. Open the page and confirm what it says before relying on any detail.
Verification supplement, 6 November 2026: Actual current command reference opened: default removes containers/networks, volumes remain; --volumes explicit; external volumes not removed.
- Market practice
How to create your GDPR-compliant test data management strategy (Sogeti) ↗ — Sogeti · Generate synthetic test data first and fill the gaps with masked production data, which shrinks the data in GDPR scope (search excerpt, page not opened)
Found through a web search; the page was not opened (search excerpt, page not opened). Version: Web page, no edition number. Licence terms were not read, so put it in your own words and do not quote it. Open the page and confirm what it says before relying on any detail.
- Market practice
Reliably automating two-factor authentication testing with Selenium (Mailosaur) ↗ — Mailosaur · A test triggers a login, then reads the one-time code from a test phone number through an API (search excerpt, page not opened)
Found through a web search; the page was not opened (search excerpt, page not opened). Version: Web page, no edition number. Licence terms were not read, so put it in your own words and do not quote it. Open the page and confirm what it says before relying on any detail.
- Market practice
Execute the app as one or more stateless processes (The Twelve-Factor App) ↗ — The Twelve-Factor App methodology (12factor.net) · Twelve-factor processes are stateless; anything that must last goes in a backing service (search excerpt, page not opened)
A practitioners' method, not a standard. Search excerpt, page not opened: returned by WebSearch on 2026-10-18. WebFetch could not reach the publisher from the authoring environment.
- Market practice
Understanding the DevOps environments ↗ — AWS Prescriptive Guidance · Describes sandbox, development, testing, staging and production environments, and says staging is a pre-production copy set up to be as similar to production as possible (search excerpt, page not opened)
Found through a web search; the page was not opened (search excerpt, page not opened). Licence terms were not read, so put it in your own words and do not quote it. Open the page and confirm what it says before relying on any detail.
- Market practice
ISTQB Certified Tester Advanced Level Test Automation Engineering (CTAL-TAE) Syllabus v2.0 ↗ — International Software Testing Qualifications Board (ISTQB) · Section 2.1.2 (printed page 18): five environments for automated tests: local development, build, integration, preproduction, production; which test types fit each; monitoring from the integration environment on; version 2.0 of 2024-05-03, mirror copy of the publisher PDF, version checked against front matter, opened
Primary publisher body opened and relevant sections read on 6 November 2026; selected-section reading, not a claim every page or external link was read. See docs/research/v16-testing-automation-literacy-audit-20261106.md for exact sections, version and limitations.
V52 additionally read actual publisher PDF7 November 2026: version 2.0,3 May 2024 front/introduction and all substantivechapters 1–8/29 learning objectives, throughprintedp 53 and selectedreferences. Not every appendix or cited book. §3.1.5 says interface substitution; Martin’s original calls it Interface Segregation. Preserve the source discrepancy separately. No unrestricted commercial image permission established.
- Market practice
ISTQB Certified Tester Advanced Level Test Automation Engineering (CTAL-TAE) Syllabus v2.0 ↗ — International Software Testing Qualifications Board (ISTQB) · Section 5.1.2 (printed page 35): configuration management of testware: environment configuration, test data, suites and cases; feature toggles per release or environment; releasing testware with the system using tags or branches; version 2.0 of 2024-05-03, mirror copy of the publisher PDF, version checked against front matter, opened
Primary publisher body opened and relevant sections read on 6 November 2026; selected-section reading, not a claim every page or external link was read. See docs/research/v16-testing-automation-literacy-audit-20261106.md for exact sections, version and limitations.
V52 additionally read actual publisher PDF7 November 2026: version 2.0,3 May 2024 front/introduction and all substantivechapters 1–8/29 learning objectives, throughprintedp 53 and selectedreferences. Not every appendix or cited book. §3.1.5 says interface substitution; Martin’s original calls it Interface Segregation. Preserve the source discrepancy separately. No unrestricted commercial image permission established.
- Market practice
ISTQB Certified Tester Advanced Level Test Automation Engineering (CTAL-TAE) Syllabus v2.0 ↗ — International Software Testing Qualifications Board (ISTQB) · Section 8.1.4 (printed page 52): uses of automation beyond execution: environment set-up and control, data aging, screenshot and video generation; version 2.0 of 2024-05-03, mirror copy of the publisher PDF, version checked against front matter, opened
Primary publisher body opened and relevant sections read on 6 November 2026; selected-section reading, not a claim every page or external link was read. See docs/research/v16-testing-automation-literacy-audit-20261106.md for exact sections, version and limitations.
V52 additionally read actual publisher PDF7 November 2026: version 2.0,3 May 2024 front/introduction and all substantivechapters 1–8/29 learning objectives, throughprintedp 53 and selectedreferences. Not every appendix or cited book. §3.1.5 says interface substitution; Martin’s original calls it Interface Segregation. Preserve the source discrepancy separately. No unrestricted commercial image permission established.
- Market practice
Synthetic data ethics — confidentiality and privacy ↗ — UK Statistics Authority · Confidentiality/privacy discussion,19 October 2022; actual page opened 6 November 2026. Synthetic generation is not automatic anonymity.
Publisher primary source opened and relevant sections read on 6 November 2026 for the Agile/DevOps domain analysis. Original explanations are used; no extensive source text is copied.
Deepest material on this page: L4 — Standards & sources. Where a topic stops short of implementation depth, that is a deliberate coverage decision, not an oversight — see coverage.