
InfoQ · 2 min readSwift & Apple platforms
Lessons Learned from Migrating Unit Tests from XCTest to Swift Testing
Depop migrated ~10,000 XCTest unit tests to Swift Testing, achieving about an 80% CI runtime reduction through parallel execution and Swift Concurrency integration. The migration used a SwiftSyntax‑based converter with AI agents only for orchestration, highlighting challenges like data races and CI‑only failures and the need for manual refactoring to adopt advanced testing features.
- Parallel execution in Swift Testing cut CI test time by ~80%
- AI agents orchestrated conversion but manual review was needed to avoid unintended test rewrites
- Data races were solved by per‑test instances or @Suite(.serialized) and UI tests required @MainActor isolation