Hello Swift Community!
The review of ST-0021 "Targeted Interoperability between Swift Testing and XCTest" starts now and runs through Tuesday, March 10th, 2026. The proposal is available here: swift-evolution/proposals/testing/0021-targeted-interoperability-swift-testing-and-xctest.md at main · swiftlang/swift-evolution · GitHub
Reviews are an important part of the Swift evolution process. All review feedback should be either on this forum thread or, if you would like to keep your feedback private, directly to the review manager. When messaging the review manager directly, please keep the proposal link at the top of the message.
Trying It Out
To try this feature out, you need to be on a fairly recent toolchain. On a Mac, probably the simplest way is to use the Xcode 26.4 beta. 26.4 Beta 1 adds what this proposal refers to as "limited" interoperability:
When you call an XCTest or Swift Testing assert within a test from the opposite framework, you will see a runtime issue with warning severity if the assertion failed. (169220281)
On non-Mac platforms, in addition to a recent toolchain (such as main-snapshot), you will also need to reference the try-out-interop branches of both swift-testing and swift-corelibs-xctest from your Package.swift.
...
dependencies: [
...
.package(
url: "https://github.com/swiftlang/swift-testing.git",
branch: "try-out-interop"
),
.package(
url: "https://github.com/swiftlang/swift-corelibs-xctest.git",
branch: "try-out-interop"
),
]
...
targets: [
...
.testTarget(
...
dependencies: [
...
.product(name: "Testing", package: "swift-testing"),
]
)
...
]
You will need to also specify an LD_PRELOAD environment variable pointing at the local XCTest build when you run swift test.
LD_PRELOAD=.build/aarch64-unknown-linux-gnu/debug/libXCTest.so swift test
@jerryjrchen has kindly set up this repository as a demonstration, and I have shamelessly copied his instructions.
What Goes Into A Review?
The goal of the review process is to improve the proposal under review through constructive criticism and, eventually, determine the direction of Swift. When writing your review, here are some questions you might want to answer in your review:
- What is your evaluation of the proposal?
- Is the problem being addressed significant enough to warrant a change to Swift?
- Does this proposal fit well with the feel and direction of Swift?
- If you have used other languages or libraries with a similar feature, how do you feel that this proposal compares to those?
- How much effort did you put into your review? A glance, a quick reading, or an in-depth study?
More information about the Swift evolution process is available at swift-evolution/process.md at main · swiftlang/swift-evolution · GitHub
Thank you for contributing to Swift!
Rachel Brindle
Review Manager