In most of my projects I made sure that there was always available a recent (1) copy of the whole Production DB - this is mostly used be able to replicate erroneous behaviour in a controlled environment.
But it is also useful to get very close to "test in prod" without actually risking anything.
Actually executing data-changing code for testing is actively discouraged, though.
1) the current system takes a snapshot of the production db at the end of the day and uses it to repopulate from scratch this "staging" environment. In past cases I had to accept less frequent updates, though.
But it is also useful to get very close to "test in prod" without actually risking anything.
Actually executing data-changing code for testing is actively discouraged, though.
1) the current system takes a snapshot of the production db at the end of the day and uses it to repopulate from scratch this "staging" environment. In past cases I had to accept less frequent updates, though.