Pinterest Mansfield Mark Oct 20, 2020

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

Critical Insight

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.

The article reveals their phased rollout strategy and the surprising infrastructure challenges they hit when parallelizing tests across Firebase and AWS.

About This Article

Problem

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.

Solution

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.

Impact

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.