Better Android Testing at Airbnb (Part 5)
Article Summary
Airbnb automated screenshot testing across thousands of Android screens to catch UI regressions that manual QA kept missing. Here's how they built it.
In Part 2 of their testing series, Airbnb's Android team explains their screenshot testing infrastructure. Built on top of their MvRx mocking system, it automatically detects visual changes, accessibility issues, and memory leaks across every Fragment in their app.
Key Takeaways
- Custom library screenshots entire RecyclerViews (up to 40,000 pixels long) not just visible content
- Happo integration blocks PRs until visual diffs are approved by engineers
- Catches padding, RTL layout bugs, styling changes, and library upgrade regressions automatically
- Zero extra work for devs: tests auto-generate from existing Fragment mocks
- Added LeakCanary and accessibility checks to same test runs for free
Critical Insight
Airbnb's screenshot testing catches UI regressions automatically across all screens with no manual test writing required from product engineers.