what is new in xctest?
Asked on 06/16/2025
2 searches
In the recent WWDC sessions, several updates and enhancements to XCTest were highlighted:
-
UI Testing Enhancements: Xcode's UI testing has received significant upgrades, including an enhanced UI Automation Recording feature with a new code generation system. This makes it easier to implement UI tests by recording interactions and generating the corresponding test code automatically. Additionally, the Measure API in Xcode 26 now includes an XCT Hitch metric to catch hitches in your app during testing, such as scrolling animation performance. This helps in measuring the responsiveness of your UI (What’s new in Xcode).
-
Runtime API Checks: Xcode now includes more runtime API checks in tests configured in the Test Plan Configuration Editor. This feature helps surface framework runtime issues and threading problems using the Thread Performance Checker, which detects issues like priority inversions and non-UI work on the main thread (What’s new in Xcode).
-
Integration with Swift Testing: While Swift Testing is a new framework that offers a different approach to testing, it can coexist with XCTest. Swift Testing uses traits and a different approach to parallelization, running in process using Swift concurrency. It supports physical devices like iPhone and Apple Watch. However, for tests that use UI automation APIs like XCTest UI application or performance testing APIs like xctmetric, XCTest is still required (Meet Swift Testing).
These updates aim to streamline the testing process, improve test reliability, and enhance the overall testing experience in Xcode.

What’s new in Xcode
Discover the latest productivity and performance advancements in Xcode 26. Learn how to leverage large language models in your development workflow. Explore editing and debugging enhancements, improved performance and testing tools, and Swift Build - the open-source build system engine used by Xcode.

What’s new in Xcode 16
Discover the latest productivity and performance improvements in Xcode 16. Learn about enhancements to code completion, diagnostics, and Xcode Previews. Find out more about updates in builds and explore improvements in debugging and Instruments.

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.