Our Android testing process
Article Summary
Headspace went from <20% test coverage to 80%+ during a complete app rewrite. Here's how they built a testing strategy that actually works.
The Headspace Android team shares their journey from minimal testing to a robust, multi-layered testing strategy. They detail how they balance speed with confidence using unit tests, integration tests, and E2E tests across 4,600+ test cases.
Key Takeaways
- Unit tests run in under 5 minutes for 4,600+ tests using MockK and Robolectric
- Integration tests with MockWebServer eliminated network flakiness that plagued E2E tests
- Tests categorized as Smoke, Regression, and MAT run at different pipeline stages
- Report Portal integration with Slack automates bug ticketing and simplifies test reporting
- Parallel testing with Flank across multiple devices cuts execution time dramatically
Critical Insight
By tiering tests strategically and investing in tooling (Report Portal, Flank, MockWebServer), Headspace catches critical bugs pre-release without slowing down PRs.