Wealthfront Mar 17, 2025

How 40 Lines of Code Sped Up iOS End to End Tests by over 50%

Article Summary

Wealthfront's iOS team cut E2E test time in half with just 40 lines of code. The culprit? A 1-second polling interval nobody questioned.

With 30k unit tests and nearly 1k E2E tests, Wealthfront's iOS team prioritized reliability over speed using XCTWaiter. But they discovered Apple's polling mechanism was blocking for a full second between checks, a design from the pre-M-series era that was killing performance.

Key Takeaways

Critical Insight

By replacing Apple's outdated XCTWaiter with a custom polling mechanism using exponential backoff, Wealthfront achieved 50% faster E2E tests on CI and 80% locally.

The appendix includes drop-in helper functions you can use to implement this in your own iOS test suite today.

Recent from Wealthfront

Related Articles