BugMedic

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.

By BugMedic editorial teamLast source review: 2026-09-27macOS

Check the scheme’s Test action, test target membership, and selected destination before debugging individual assertions.

Try these fixes in order

01

Inspect the scheme

Open Edit Scheme > Test and verify the intended unit or UI test target is included and enabled.

02

Check discovery

Confirm the test method is discoverable by XCTest or Swift Testing and is compiled in the test target.

03

Choose a supported destination

Use a simulator or device supported by the app and test target; UI tests need an app host.

04

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.

Related Xcode guides