Should I migrate to Swift Testing?
Asked on 2026-07-08
1 search
Yes — Apple’s guidance is to migrate to Swift Testing, especially for new tests and for gradually modernizing existing XCTest suites.
Why migrate
- Modern API: Swift Testing uses expressive macros like
@Test,#expect, and#require. - Better Swift fit: It was designed with Swift concurrency in mind and runs tests in parallel by default.
- Cross-platform: It’s open source and works across Apple platforms, plus other platforms like Linux and Windows.
- Incremental migration is supported: You can keep XCTest and Swift Testing in the same target and move tests over in small chunks.
Apple’s recommended approach
From Migrate to Swift Testing:
- Don’t feel pressured to rewrite everything at once
- Start by writing new tests in Swift Testing
- Migrate frequently changed tests first
- Use test framework interoperability to reuse existing helper code during the transition
When to keep XCTest
Apple says to keep using XCTest for a few cases:
- UI Automation
- Performance Testing APIs
- Tests involving Objective-C exceptions
Bottom line
If your project can use Swift Testing, yes, migrate — but do it incrementally. Apple presents it as the modern direction for Swift testing, while still acknowledging that XCTest remains necessary in some scenarios.
If you want, I can also summarize the exact migration strategy Apple recommends.

Migrate to Swift Testing
Learn how to fearlessly adopt Swift Testing alongside your XCTests using test framework interoperability. Discover best practices and patterns for incrementally introducing advanced testing features that accelerate development and increase coverage.

What’s new in Swift
Join us for an update on Swift. Discover the latest language advancements, including updates for everyday ergonomics, improved concurrency, and safer high-performance code. Explore workflow and language interoperability improvements and updates in embedded Swift.

Meet Swift Testing
Introducing Swift Testing: a new package for testing your code using Swift. Explore the building blocks of its powerful new API, discover how it can be applied in common testing workflows, and learn how it relates to XCTest and open source Swift.
