Swift Testing: The Great, The Good, and The Bad
Ibrahima Ciss
09:00-12:00, Monday, 18th May 2026
Apple introduced Swift Testing as the modern successor to XCTest, and on paper, it's everything we've been asking for: expressive declarations with
@Test, parameterized testing without boilerplate, and the ability to organize tests using Swift's natural type system instead of awkward class hierarchies.
But as with any major framework shift, the reality is more nuanced. In this session, we will take an honest, pragmatic look at Swift Testing based on real-world adoption experiences. We will explore The Great features that instantly improve code quality, such as expressive macros and parameterized arguments. We’ll cover The Good strategies for incremental migration and running hybrid test suites alongside XCTest. Finally, we won’t shy away from The Bad: current tooling limitations, missing features from the XCTest world, and the CI/CD challenges you might face when leaving the "standard" path.
Outline
-
Introduction: A New Era or Just New Syntax?
- Brief history of testing on Apple platforms (OCUnit -> XCTest -> Swift Testing).
- The philosophy shift: From runtime introspection to macro-based compile-time safety.
- Setting the baseline: What does a "Hello World" test look like in both frameworks?
-
The Great: Features We Can't Live Without
- Macros in Action: Deep dive into
#expectand#require. How they capture source code expressions to provide vastly superior failure messages compared toXCTAssert. - Parameterized Testing: Using
argumentsto collapse 50 lines of repetitive test code into a single, clean declaration. - Concurrency by Default: How Swift Testing leverages Swift 6 concurrency (Actors, Sendable) to eliminate flaky race conditions in tests.
- Macros in Action: Deep dive into
-
The Good: Coexistence and Organization
- Suites and Tags: Organizing tests using
@Suiteand@Tagfor flexible filtering (e.g., running only.criticalor.fasttests) without relying on rigid inheritance schemes. - Hybrid Codebases: Demonstrating how Swift Testing and XCTest run in the same test bundle.
- Migration Strategy: A step-by-step guide to converting a legacy XCTestCase to a Swift Testing Suite without rewriting the entire logic.
- Suites and Tags: Organizing tests using
-
The Bad: The "Early Adopter" Tax
- Tooling Gaps: Current limitations in Xcode's test navigator and result visualizer compared to the mature XCTest integration.
- Missing Features: XCTest features that don't have direct equivalents yet (e.g., complex UI testing interactions, certain performance metric APIs, or
XCTContextactivities). - CI/CD Friction: Challenges in parsing test results and generating reports in environments like Jenkins or GitHub Actions that are tuned for
xcresultbundles generated by XCTest.
-
Conclusion: Is It Production Ready?
- Summary of the pros and cons table.
- Recommendations for greenfield projects vs. massive legacy codebases.
- Final thoughts on the future trajectory of the framework.
Ibrahima Ciss
Ibrahima is a highly-motivated Senior iOS Engineer with 10+ years of experience architecting, developing, and launching high-performance, user-centric applications for millions of users across Fintech, Banking, E-commerce, and Entertainment sectors. A recognized community leader, international conference speaker, and mentor dedicated to building robust, scalable solutions using modern technologies like SwiftUI, Swift Concurrency, and advanced architecture patterns.