# Why can’t a Project scheme’s testAction reference test targets from another project?

**URL:** https://community.tuist.dev/t/why-can-t-a-project-scheme-s-testaction-reference-test-targets-from-another-project/1005
**Category:** Troubleshooting & how to
**Created:** [August 15, 2026, 9:15pm UTC](https://community.tuist.dev/t/why-can-t-a-project-scheme-s-testaction-reference-test-targets-from-another-project/1005 "2026-08-15T21:15:37Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![Ernest0N](https://community.tuist.dev/user_avatar/community.tuist.dev/ernest0n/32/10_2.png) [@Ernest0N](https://community.tuist.dev/u/Ernest0N)
#### Post date: [August 15, 2026, 9:15pm UTC](https://community.tuist.dev/t/why-can-t-a-project-scheme-s-testaction-reference-test-targets-from-another-project/1005/1 "2026-08-15T21:15:38Z")

</div>

# Question or problem

In a multi-project Tuist workspace, why can’t a **Project** scheme’s `testAction` reference unit-test targets that live in another project via `TargetReference.project(path:target:)`, while the same cross-project testables can be added in Xcode’s scheme editor UI after generation?

We’re trying to understand the **design rationale** for this restriction (not looking for a workaround recipe).

# Current behavior

`tuist generate` fails with:

> The target `CoreKit-UnitTests` specified in scheme `MyApp` is not defined in the project named `App`. Consider using a workspace scheme instead to reference a target in another project.

That message comes from [`SchemeLinter.swift` L173](https://github.com/tuist/tuist/blob/4.203.4/cli/Sources/TuistGenerator/Linter/SchemeLinter.swift#L173) (`projectSchemeCantReferenceRemoteTargets`).

Meanwhile, after generating without that cross-project reference, opening the App scheme in Xcode UI and adding `CoreKit-UnitTests` to the Test action works at runtime.

The generated Tuist workspace scheme is not a good fit for us either: it also includes UI test targets that exist in the project, which we don’t want in this aggregated test action.

# Expectation

Project schemes should be able to include cross-project test targets the same way Xcode’s scheme editor allows — or, if this is intentional, understanding **why** project schemes are restricted while Xcode GUI / runtime still allow it.

# Context

- Tuist version: **4.203.4**
- Workspace layout (simplified):
  - `App` project (app + its own unit/snapshot tests + UI tests)
  - `Frameworks/CoreKit` project (framework + unit tests)
  - shared `Workspace.swift` including both projects

We want the App scheme’s Test action to also run dependency module tests (convenient for local/CI workflows), without hand-editing generated schemes.

# Sample

Declare a scheme on the App `Project` that references another project’s tests:

```swift
// inside Project.swift for App
Scheme.scheme(
  name: "MyApp",
  testAction: .targets([
    .testableTarget(target: .target("MyApp-UnitTests")),
    .testableTarget(target: .project(
      path: "Frameworks/CoreKit",
      target: "CoreKit-UnitTests"
    ))
  ])
)

```
