leboncoin Aliou Sarr May 24, 2023

Achieving Higher Test Coverage: Our Approach to UI Testing on iOS

Article Summary

Aliou Sarr from leboncoin reveals how shifting UI test ownership from QA to developers doubled their test count in under a year. The result? A 99.6% crash-free iOS app serving 28 million monthly users.

With 40 iOS developers shipping weekly releases across 50 modules, leboncoin faced a testing bottleneck. Their QA team wrote UI tests after features shipped, causing delays and missed regressions. They redesigned their entire approach to put developers back in control.

Key Takeaways

Critical Insight

By giving developers ownership of UI tests and building a custom framework to simplify XCTest, leboncoin doubled their test coverage and hit 99.6% crash-free sessions.

The team plans to open-source TestKit and tackle snapshot testing next, plus they're wrestling with multi-language test challenges worth watching.

About This Article

Problem

At leboncoin, QA-driven UI testing created a bottleneck. Several days would pass between when developers committed code and when tests actually ran. This made it harder to fix regressions across a team of 40 iOS developers shipping updates weekly.

Solution

leboncoin built TestKit, an internal framework that wraps XCTest with helper methods for common UIKit components like buttons and text views. This let developers write standardized tests that focused on logic instead of getting bogged down in implementation details.

Impact

Test execution got faster and developers shipped more quickly. The framework made it easier to write and maintain tests across the 50 functional and technical modules in leboncoin's segmented iOS app architecture.