Trendyol Dogancan Mavideniz Jul 30, 2026

The Scroll Problem in iOS UI Tests and How XCScrollHelper Solves It

Article Summary

Dogancan Mavideniz from Trendyol reveals how his team cut iOS UI test execution time by 5x. The culprit? The way XCTest handles scrolling.

In e-commerce apps with long scrollable lists, UI tests spend most of their time waiting for swipe animations to complete. Trendyol's iOS team built XCScrollHelper, an open-source library that bypasses XCTest's swipe mechanism entirely by using file-based communication between test and app processes.

Key Takeaways

Critical Insight

By replacing XCTest's animation-based scrolling with programmatic setContentOffset calls, XCScrollHelper achieves 5x faster test execution across thousands of snapshot tests.

The implementation uses a clever file-monitoring trick that most iOS developers haven't considered for test automation.

About This Article

Problem

Trendyol's iOS team had trouble with unreliable scrolling in UI tests. Swipe distances varied depending on device size and dynamic type settings, so developers had to set maxSwipes very high just to handle the worst cases.

Solution

XCScrollHelper lets the app and test processes communicate through files. It uses UICollectionViewLayout's layoutAttributesForItem to find exact coordinates, then calls setContentOffset directly instead of simulating swipes.

Impact

Flaky test rates dropped because programmatic scrolling removed the variables that came from different devices and layouts. Developers also stopped needing boilerplate scroll code to reach components that were off-screen.