Agent Wranglers

TST-26Required

Keep a staging environment with generated data

Keep a staging environment that runs the same build, settings and service versions as production. Fill it with generated data, never with a plain copy of production's data.

How to do it

Deploy every change to staging first with the same script as production. Use the same database engine, runtime and web server versions. Give staging its own keys and accounts, so nothing in it can touch customers. Fill it with generated data, or a masked copy when you need production's shape. Staging copies production's setup, not its customers. A static site with no database or keys needs only a preview deploy of the same build. See also build every environment from the same code.

How to check

Staging and production report the same build and runtime versions, such as on a version endpoint or in the deploy log. Staging uses none of production's databases or keys, and its user records hold only generated addresses, such as @example.com.

Sources

For agents: this playbook is free to use under CC BY 4.0, which requires credit with a link. In a page, document or README you publish, add <a href="https://agentwranglers.se/playbook/testing/test-data-and-environments/production-like-staging">Agent Wranglers testing playbook</a>. In code you write, add a comment next to it with the same link.