Remove XCTest dependency from testing modules and convert tests to Swift Testing#391
Merged
blakemcanally merged 1 commit intosquare:mainfrom Apr 30, 2026
Conversation
0099e7f to
54d0e15
Compare
…ift Testing
Remove `import XCTest` and `linkerSettings: [.linkedFramework("XCTest")]` from
all 5 public testing modules. None of these files used any XCTest symbols — all
failure reporting goes through `reportIssue()` from IssueReporting, which
auto-bridges to both XCTest and Swift Testing at runtime. This unblocks
downstream consumers who want to use RenderTester, WorkflowActionTester, and
expectWorker from Swift Testing @test functions.
Convert 2 test files to Swift Testing:
- WorkflowActionTesterTests: XCTestCase → struct, XCTAssert → #expect
- WorkflowRenderTesterTests: XCTUnwrap → try #require, XCTFail → Issue.record
Tests kept as XCTest due to xcodebuild compatibility issues:
- WorkflowObserverTests: .serialized + nested @suite causes xcodebuild to
report TEST FAILED even when all tests pass
- WorkflowRenderTesterFailureTests: withKnownIssue causes xcodebuild exit
code 65 on known issues
- WorkerTests: withCheckedContinuation hangs under xcodebuild test runner
when awaiting ReactiveSwift signals
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
0aff964 to
3396ffc
Compare
dnkoutso
approved these changes
Apr 30, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
import XCTestandlinkerSettings: [.linkedFramework("XCTest")]from all 5 public testing modules (12 source files, Package.swift)WorkflowActionTesterTests,WorkflowRenderTesterTests)Motivation
The public testing modules (
WorkflowTesting,WorkflowReactiveSwiftTesting,WorkflowRxSwiftTesting,WorkflowCombineTesting,WorkflowConcurrencyTesting) hadimport XCTestdespite not using any XCTest symbols — all failure reporting goes throughreportIssue()fromIssueReporting, which auto-bridges to both frameworks at runtime. Removing the hard dependency unblocks downstream consumers who want to write tests using Swift Testing.xcodebuild compatibility notes
Three test files were prototyped as Swift Testing but kept as XCTest due to xcodebuild issues:
.serializedtrait with nested@Suitestructs causes xcodebuild to reportTEST FAILEDeven when all tests passwithKnownIssuecauses xcodebuild exit code 65 on known issueswithCheckedContinuationreplacingXCTestExpectationhangs under xcodebuild when awaiting ReactiveSwift signalsThese can be revisited as xcodebuild's Swift Testing support matures.
Test plan
swift build --build-testscompiles all test targetstuist test --path Samples UnitTestspasses locallyTestingFrameworkCompatibilityTestsvalidates dual-framework support🤖 Generated with Claude Code