%%
date:: [[2022-11-08]]
%%
# [[Testing in production]]
Testing in production is a practical approach to testing that challenges the assumption that testing should *always* be done in pre-production environments. It is one of the key tenets of [[Shift-right testing]], although the scope of shift-right testing goes beyond just testing in production.
## Risks
- Defects uncovered in production are already live, and may take considerable effort to fix.
- [[Load Testing]] in production can be disruptive and lead to decreased performance for end users.
## Ways to mitigate risks
- Testing in production should not be the _first_ time that an application is tested; think of it as an additional environment to test rather than a replacement one.
- Reconsider doing potentially disruptive forms of testing in production; favor instead smaller verification tests
- Be mindful of test data created in the process of testing. Have designated test accounts that can be excluded from marketing analytics.
## Benefits
- Cost - don't let not having an environment stop you from testing. Something is better than nothing
- No need to worry about how to scale test results from pre-prod into production: production is the ultimate test