Releasing Features with Confidence in Mobile Apps
Article Summary
Shubhnik Singh Mann from Razorpay reveals why most mobile teams are testing wrong. Their approach eliminated P0 production issues entirely.
Razorpay's mobile team shares their battle-tested strategy for shipping React Native features without regression. They break down the difference between tests that catch bugs and tests that just waste time, using real examples from their Payment Link feature.
Key Takeaways
- Shallow rendering creates false positives by testing components without their children
- Testing implementation details breaks refactors even when user experience stays identical
- Integration tests with full component trees catch bugs unit tests miss
- Simulate user interactions with fireEvent instead of calling component methods directly
- Reserve snapshot tests for reusable UI components, not stateful logic
Razorpay's shift to user-focused integration testing enabled them to ship major refactors and new features with zero P0 production issues.
About This Article
Mobile app teams face long app store review cycles that make regressions expensive. This forces them to pick between moving fast with features or being careful with manual testing.
Razorpay built a two-part testing approach with Jest and react-native-testing-library. They combined component tests that cover both units and integration points with e2e UI tests to catch regressions automatically.
The team shipped major refactors and new features without any P0 production issues. Developers could iterate faster while SonarQube tracked code coverage in their CI pipeline.