Most real iOS projects in 2026 should run both Swift Testing and XCTest: Swift Testing for new and migrated unit tests, and XCTest for UI tests, performance tests, and any code that still interacts with Objective-C.
This article details the differences between the two frameworks and guides you through migrating a production app module piece by piece without rewriting the entire suite. Each code example is from a small Swift package ( AuthKit , source on GitHub ) that I tested before publishing.
Toolchain: Xcode 26.3 (17C529), Swift 6.2.4, Swift 6 language mode.
Platforms: macOS, plus the iOS 26.2 and iOS 18.5 simulators.
Result: 22 Swift tests (38 test cases once arguments are expanded) and 5 XCTest tests, all in one package with no warnings.
Where a feature needs a particular Swift version, I say so.
1. Introduction
Why test architecture matters
Modern iOS code is concurrent by default.…