top of page
Writer's pictureJon White

Testing in Production: Balancing Risk and Innovation


Testing in Production

Introduction

In today’s fast-paced digital world, where software updates and new features are expected to be delivered at lightning speed, traditional testing methodologies often fall short. Testing environments, such as staging and development, attempt to replicate production as closely as possible, but they can never fully mirror the complexities and unpredictable nature of real-world usage. This gap has led to the rise of testing in production - a practice where new code and features are deployed and tested directly in the live environment where end-users interact with the system.


Testing in production is not a new concept, but its adoption has been significantly influenced by modern software development practices. Continuous Integration and Continuous Deployment (CI/CD), agile methodologies, and the demand for rapid innovation have pushed the boundaries of traditional testing. Companies are now more willing to take calculated risks to achieve faster feedback loops and higher quality software.


However, testing in production is a double-edged sword. While it offers undeniable advantages, such as real-world data and user behavior insights, faster feedback, and cost efficiency, it also comes with significant risks. The potential impact on end-users, data corruption, security vulnerabilities, and the challenge of maintaining control over changes are all critical concerns that need to be addressed.


In this blog post, we will explore the multifaceted nature of testing in production. We will analyze the pros and cons, provide practical tips for when and how to test in production, and share case studies of leading companies that have successfully integrated this approach. By examining these aspects, organizations can better understand the risks and rewards, and develop strategies to leverage testing in production effectively.


Understanding Testing in Production

 
Testing In Production Refers To The Practice Of Deploying & Testing New
Features, Updates, Or Changes Directly In The Live Environment 
 

Testing in production refers to the practice of deploying and testing new features, updates, or changes directly in the live environment where real users interact with the system. Unlike traditional testing environments, such as development, staging, or QA, production testing involves real-world conditions and user behavior.


Historically, software testing was confined to controlled environments. The production environment was considered sacred and immutable until thoroughly tested versions were ready. However, with the advent of agile methodologies and the demand for continuous delivery, the lines have blurred. The traditional model, while robust, could not keep up with the speed of modern software development.


Modern development practices emphasize rapid iteration, quick feedback loops, and continuous improvement. Continuous Integration/Continuous Deployment (CI/CD) pipelines, microservices architectures, and the DevOps movement have all contributed to the growing acceptance of testing in production. These practices ensure that changes are integrated and deployed continuously, with rigorous automated testing and monitoring.


Pros of Testing in Production


  1. Real-World Data and User Behavior: One of the most significant advantages of testing in production is the ability to test with real-world data and actual user behavior. This provides insights that are impossible to replicate in a controlled environment. Real users interact with the system in unpredictable ways, uncovering bugs and performance issues that might never surface in staging.


  1. Faster Feedback and Iteration: Testing in production accelerates the feedback loop. Developers can quickly see how their changes affect the system in real-time and make necessary adjustments. This speed is crucial for agile development practices, where continuous iteration and rapid deployment are key.


  1. Cost and Resource Efficiency: Maintaining multiple environments can be resource-intensive and costly. By testing directly in production, organizations can reduce the overhead associated with setting up and maintaining staging environments. Additionally, production testing can reveal issues that would have otherwise gone unnoticed, potentially saving significant costs in the long run.


  1. Improved Detection of Edge Cases: Edge cases and rare bugs often only emerge under specific conditions that are hard to simulate in testing environments. Production testing exposes the software to the full spectrum of user interactions and data variations, increasing the likelihood of detecting these elusive issues.


Cons of Testing in Production


  1. Risk of Impacting Users: The most obvious drawback of testing in production is the risk of negatively impacting end-users. Unforeseen bugs or performance issues can degrade the user experience, potentially leading to dissatisfaction, lost revenue, or damage to the company’s reputation.


  1. Potential for Data Corruption: Testing in a live environment can inadvertently lead to data corruption. Unchecked changes can result in data loss or inconsistency, which can be particularly damaging in sectors that rely on data integrity, such as finance or healthcare.


  1. Security Concerns: Testing in production raises significant security concerns. Vulnerabilities can be exposed, making the system susceptible to attacks. Ensuring that security measures are robust and that sensitive data is protected is paramount when conducting any form of testing in production.


  1. Maintaining Control and Rollback Mechanisms: Once a change is deployed to production, maintaining control and having the ability to quickly rollback is crucial. Without proper rollback mechanisms, a problematic change can wreak havoc on the system, leading to prolonged downtime and user frustration.


When It Makes Sense to Test in Production


  • Low-Risk Changes: Testing low-risk changes, such as minor UI tweaks or non-critical features, can be safely conducted in production. These changes are less likely to cause significant disruptions and can be quickly reverted if issues arise.


  • Feature Toggles and A/B Testing: Feature toggles allow new features to be enabled or disabled dynamically, providing a safe way to test in production. A/B testing enables comparing different versions of a feature to determine which performs better with real users, providing valuable insights without fully committing to a change.


  • Dark Launches and Canary Releases: Dark launches involve deploying new features to production without making them visible to users. This allows for backend testing and performance monitoring. Canary releases gradually roll out changes to a small subset of users, minimizing risk while gathering real-world feedback.


  • Real-Time Performance Monitoring: Testing in production is particularly useful for performance monitoring. Real-world usage patterns can be monitored, and performance bottlenecks can be identified and addressed. This ensures that the system performs optimally under actual conditions.


Practical Tips for Testing in Production

Implementing Feature Toggles

Feature toggles allow you to turn features on and off dynamically. This provides a way to safely test new features in production by enabling them for a limited audience or disabling them if issues arise.


Using Canary Releases

Canary releases involve rolling out changes to a small, controlled group of users before a full-scale deployment. This approach helps detect potential issues early while limiting the impact on the overall user base.


Monitoring and Observability Tools

Investing in robust monitoring and observability tools is critical for testing in production. These tools provide real-time insights into system performance, user behavior, and potential issues, enabling quick detection and resolution of problems.


Automating Rollbacks

Having automated rollback mechanisms in place is essential. If a change causes issues, automated rollbacks can revert the system to a previous stable state, minimizing downtime and user impact.


Communication Strategies

Effective communication with your team and users is crucial when testing in production. Ensure that stakeholders are aware of the potential risks and benefits, and have a plan in place for communicating with users in case of disruptions.


Case Studies of Companies Testing in Production

Facebook: Continuous Delivery and Dark Launches

Facebook is known for its aggressive continuous delivery practices, deploying code to production multiple times a day. They use dark launches to test new features without exposing them to all users, gathering data and making necessary adjustments before a full rollout.


Netflix: Chaos Engineering and Resilience Testing

Netflix pioneered the concept of chaos engineering, intentionally introducing failures into their production environment to test system resilience. This approach has helped them build a robust and highly available streaming service.


Google: Feature Toggles and Incremental Rollouts

Google uses feature toggles and incremental rollouts to test new features in production. By gradually increasing the number of users who see a new feature, they can monitor performance and user feedback, ensuring a smooth deployment.


Amazon: A/B Testing and Real-Time Metrics

Amazon extensively uses A/B testing to compare different versions of features in production. Real-time metrics and user feedback drive their decision-making process, enabling them to iterate quickly.


Conclusion

 
Successful Implementation Of Testing In Production Requires A Delicate Balance, Leveraging
Low-Risk Changes, Controlled Rollouts, And Comprehensive Observability 
 

Testing in production, though a contentious practice, presents a unique blend of opportunities and challenges for modern software development. By directly interacting with real-world data and user behavior, organizations can gain invaluable insights that traditional testing environments simply cannot provide. This practice enhances the speed and efficiency of feedback loops, leading to rapid iteration and continuous improvement. Companies like Facebook, Netflix, Google, and Amazon have demonstrated that with the right strategies, such as feature toggles, canary releases, and robust monitoring tools, testing in production can drive innovation and resilience in their systems.


However, the approach is not without its risks. Potential impacts on end-users, data corruption, security vulnerabilities, and the complexity of managing rollbacks are significant concerns that need meticulous planning and mitigation. Successful implementation of testing in production requires a delicate balance, leveraging low-risk changes, controlled rollouts, and comprehensive observability to minimize disruptions while maximizing the benefits. The key lies in adopting best practices and ensuring robust communication strategies within the team and with end-users.


In the ever-evolving area of software development, testing in production stands as a testament to the adaptability and forward-thinking nature of modern engineering practices. As technology continues to advance, the methods and tools supporting this practice will also evolve, potentially making it an even more integral part of the development lifecycle. By understanding and addressing its complexities, organizations can harness the power of real-world testing to deliver higher quality, more resilient software, ultimately leading to better user experiences and sustained competitive advantage.


About The Author

Jon White is an experienced technology leader with over 34 years of international experience in the software industry, having worked in the UK, Malaysia, Bulgaria, and Estonia. He holds a BSc (Hons) in Systems Design. He led the Skype for Windows development teams for many years (with 280 million monthly connected users), playing a key role in the team's transition to Agile.


Jon has held multiple leadership positions throughout his career across various sectors, including loyalty management, internet telecoms (Skype), IT service management, real estate, and banking/financial services.


Jon is recognized for his expertise in Agile software development, particularly helping organizations transform to Agile ways of working (especially Scrum), and is a specialist in technical due diligence. He is also an experienced mentor, coach, and onboarding specialist.


Over the last few years, he has completed over a hundred due diligence and assessment projects for clients, including private equity, portfolio companies, and technology companies, spanning multiple sectors. Contact Jon at jon.white@ringstonetech.com.


bottom of page