Pre-submit UI Tests at Pinterest
Article Summary
Pinterest's UI test suite was failing more than 50% of the time. Engineers were drowning in false positives, and tests had lost all credibility.
Pinterest's mobile team moved their entire end-to-end UI test suite from post-submit to pre-submit, running 300 tests on every code change. This meant solving hard problems around speed, cost, flakiness, and developer experience.
Key Takeaways
- Pass rate jumped from under 50% to over 90% after the shift
- Every test requires an owner and silenced tests must be fixed within 2 weeks
- Smart sharding and custom schedulers keep 300 tests under 30 minutes
- Result caching lets devs skip reruns when tests are false negatives
- Stability Enforcer auto-silences tests showing over 20% flakiness
By running UI tests before merge instead of after, Pinterest cut investigation time, raised pass rates to 90%, and made their test platform actually trustworthy again.
About This Article
Pinterest ran about 700 builds per week with 300 tests in each build. When tests failed, fixing them took a lot of work, and developers lost days switching between different issues.
Pinterest assigned test ownership to specific people, used Smart Flank sharding for Android tests, and built a custom pinpill scheduler for iOS. These changes let them run tests in parallel while keeping the total time under 30 minutes.
The main branch stayed stable during business hours, developers spent less time investigating failures, and the test platform became something the team could trust instead of something that frustrated them.