Xcode tests do not run or test target is missing
Check the scheme’s Test action, test target membership, and selected destination before debugging individual assertions.
Check the scheme’s Test action, test target membership, and selected destination before debugging individual assertions.
Try these fixes in order
Inspect the scheme
Open Edit Scheme > Test and verify the intended unit or UI test target is included and enabled.
Check discovery
Confirm the test method is discoverable by XCTest or Swift Testing and is compiled in the test target.
Choose a supported destination
Use a simulator or device supported by the app and test target; UI tests need an app host.
Read results
If tests launch but fail, open the result bundle for the first failure rather than changing test discovery settings.
Interpret what you see
No tests are discovered
What it suggests: The scheme or test target may exclude the methods.
Next check: Check Test action membership and whether test methods compile into the target.
The test runner cannot launch
What it suggests: An app-hosted test needs a valid app and destination.
Next check: Inspect signing, selected simulator/device, and the test runner’s first launch error.
Tests launch and fail
What it suggests: This is an assertion or runtime problem, not discovery.
Next check: Open the result bundle, isolate one test, and inspect its failure context.
Why this happens
- The active scheme excludes the test target.
- The test target cannot build or launch for the selected destination.
Still not working?
Distinguish “zero tests discovered” from “tests crashed before execution”; their fixes differ.
Official sources
These steps are based on the linked documentation and general diagnostics. BugMedic has not independently tested every product and system configuration. Review commands before running them.