REW

What Is Test On Production?

Published Aug 29, 2025 5 min read
On this page

Testing in production (TiP) is the practice of evaluating new features, updates, or code changes directly within a live, real-world environment where actual users and data are present.

Historically seen as a reckless practice, TiP has evolved into a strategic and controlled approach in modern software development, especially within DevOps and continuous delivery workflows. It does not replace traditional pre-production testing but complements it by uncovering issues and gaining insights that are impossible to replicate in a staging environment.

Why test in production?

Staging environments, no matter how carefully constructed, are never a perfect replica of production. Real-world variables—live user traffic, complex data sets, and unpredictable usage patterns—can expose flaws that are missed in pre-production testing. By testing in production, teams gain several critical advantages:

  • Real-world validation: Accurately gauge performance under authentic, unpredictable conditions with real user loads.
  • Faster time-to-market: Reduce the time and resources spent on maintaining complex staging environments and shorten development cycles by testing features as they are released.
  • Early issue detection: Catch bugs and performance bottlenecks that only appear in a live environment, and resolve them before they impact the entire user base.
  • Superior user experience: Gather real-time feedback to make data-driven decisions about which features to roll out, leading to better products.
  • Increased resilience: Proactively test how a system responds to stress and failure, as in chaos engineering, to build more robust applications.

Common testing in production strategies

Modern TiP relies on sophisticated techniques to manage risk and control the scope of the testing.

  • Feature flags (or toggles): These act as on/off switches for new code or features, allowing developers to deploy new functionality without making it visible to users. This provides a "kill switch" to instantly deactivate a problematic feature without a new deployment.
  • Canary releases: A new version of a service is deployed to a small subset of servers and users ("the canaries"). The new version is continuously monitored, and if all is stable, it is gradually rolled out to more users. If issues arise, the rollout is halted or rolled back.
  • Blue-green deployments: Two identical production environments are maintained: a "blue" one with the current version and a "green" one with the new version. Once the green environment is tested, traffic is switched over instantaneously. This provides a fast rollback to the stable blue environment if necessary.
  • Dark launches (or shadowing/mirroring): A new version of a service is deployed to production but remains "dark"—it receives copies of live traffic but its output is hidden from users. This allows the team to observe how the new service performs under real load without affecting the user experience.
  • A/B testing: Different versions of a feature (e.g., a new user interface) are shown to different segments of the user base to determine which version performs better against key metrics.

The critical role of observability

Safe and effective TiP is impossible without robust observability. Observability provides the "eyes and ears" to understand a system's internal state by examining its outputs in real-time. Key components include:

  • Metrics: Real-time numerical data on system health, performance, and user interactions. This includes monitoring load times, error rates, and resource consumption.
  • Logging: A detailed record of events and actions that provides context for troubleshooting issues.
  • Tracing: A visual representation of a user's journey through a distributed system, essential for microservices architectures.
  • Real user monitoring (RUM): Tools that analyze actual user interactions to provide insight into performance and usability.

Risks and mitigation

While offering significant benefits, TiP comes with inherent risks that must be carefully managed.

  • Exposing bugs to real users: Bugs in production can negatively impact user experience and damage trust. Mitigation: Use feature flags and gradual rollouts (e.g., canary releases) to limit exposure.
  • Data privacy and security concerns: Using live data for testing creates security and compliance risks. Mitigation: Anonymize or use synthetic data where possible. Implement stringent access controls and coordinate closely with security teams.
  • Performance degradation and failures: Unforeseen performance issues can cause system instability. Mitigation: Implement robust real-time monitoring and alerting systems that can trigger automated rollbacks if performance thresholds are exceeded.
  • Difficulty debugging: It can be hard to reproduce production issues. Mitigation: Use comprehensive logging and tracing tools to capture detailed information, helping with root cause analysis.
  • Corruption of production data: Test actions can inadvertently alter production data. Mitigation: Use dedicated test credentials and realistic but safe test data that won't corrupt real user information.

Best practices for success

To implement TiP successfully, teams must adopt a mature, well-defined process.

  1. Start small and scale gradually: Begin with low-risk changes on small user groups before widening the audience.
  2. Use robust tooling: Invest in feature flagging platforms, monitoring solutions, and observability tools to manage rollouts and detect issues effectively.
  3. Establish clear rollback plans: Ensure a reliable and automated way to revert changes quickly if something goes wrong.
  4. Automate testing: Combine automated tests in pre-production with testing in production to ensure thorough coverage.
  5. Foster a DevOps culture: Encourage close collaboration between development and operations teams and cultivate a mindset of continuous improvement based on real-world feedback.

Conclusion

Testing in production is no longer a fringe or reckless idea but a core component of modern software delivery for high-velocity, cloud-native applications. When executed thoughtfully with the right tools and safeguards, it offers invaluable, real-world insights that lead to higher-quality, more resilient, and more user-centric software. By embracing controlled experimentation in the live environment, teams can accelerate their release cycles, mitigate risk, and ultimately deliver a superior product to their customers.

Enjoyed this article? Share it with a friend.