Testing in Production means to perform testing activities in a production state or live environment which is accessible by the end user. As companies move to implement Agile, DevOps or Continuous Integration and Delivery, testing in production tends to become an integral part of the process.
Despite the risks, there are several benefits to consider testing in production. One is that testing in production allows you to see how your application works in the live environment in which it runs. Testers will be able to identify issues and bugs not found from other testing environment activities (dev, staging, or pre-production). The defects that are identified in production will help the development team isolate every issue to improve application quality and provide a better customer experience.
The advantages of the so called ‘shift right’ approach are:
- Enhancing Customer Experience: Allows the teams to gather user feedback and incorporate them in quick succession.
- Maximum test coverage: Shift right approach to testing provides testers the freedom to test more, test on-time and test late. That translates to lesser bugs, and better application quality.
- More automation: Automation saves time and effort. Automating large parts of the process, helps in saving time and eventually helps in providing quality at speed.
- Continuous Monitoring: It helps monitoring the application’s performance in real-time scenarios where the test cases are not predefined, and the user keeps changing data.
Testing and monitoring in production is a great way to learn how your system is really performing with real users, real requests, and real data. It helps in getting continuous feedback from users which is very important in the testing process, and enables responding better to the unexpected events out of the test engineer’s purview such as crash down, slow performance and failures.
And this is because testing and production environments will always be different. Although a lot of effort is spent on creating test environments that are production-like, there will always be differences, and even the smallest differences can have a huge impact on the data you collect in your tests.
A well -planned strategy and process can overcome the potential risks that may occur with testing in production environments. These risks are mainly:
- The testing data is real, so it should be encrypted.
- No rollback plan when a release goes sideways
- Exposing potential vulnerabilities
- Timing of tests. Running a load test during business hours for example will most probably slow down the application and impact user experience.
Testing in production does not mean that we should not ‘shift left’ with testing at every stage of the pipeline. It comes to supplement the process providing an additional guard around your application. A combination of ‘shift left’ and ‘shift right’ approaches is effectively the best way and should be part of your Continuous Testing strategy.