← ClaudeAtlas

host-driven-xcuitest-e2elisted

Wire and debug launch-the-app XCUITest E2E tests in a Tuist project: a native `.uiTests` target needs its own scheme with `testAction: .targets([...])`, not `.xctestplan` membership; a name that does not collide with an SPM UITests package target; window-frame-anchored clicks for SwiftUI on macOS where `element.tap()` fails. Use when `xcodebuild test` reports no test bundles available to test, when XCUITest taps do not land on a macOS window, when adding a first E2E target, or when pinning a Simulator audit finding as a CI regression test. Manual exploration → interactive-simulator-ux-audit.
wei18/apple-dev-skills · ★ 19 · Testing & QA · score 78
Install: claude install-skill wei18/apple-dev-skills
# Host-Driven XCUITest E2E "Host-driven" means the test process launches the real app and drives it through the Simulator or a Mac window via `XCUIApplication` — distinct from unit/snapshot tests, which never launch a process at all. This is the automated, CI-runnable sibling of `interactive-simulator-ux-audit`: use that skill to *find* a flow bug by hand, this one to *pin* it as a regression test. ## When to invoke - Wiring a first host-driven E2E target in a Tuist-generated project. - `xcodebuild test` reports "There are no test bundles available to test" for a target that otherwise builds cleanly. - Driving a SwiftUI macOS (AppKit-hosted) window with XCUITest and taps aren't landing. - Naming a new UI test target and avoiding a collision with an existing package test target. ## Scope Owns: Tuist scheme/target wiring for native XCUITest targets, and the macOS driving mechanics below. Does **not** own: manual/interactive Simulator exploration → `interactive-simulator-ux-audit`; unit/snapshot test framework choice → `swift-testing-baseline`; general navigation architecture under test → `swiftui-navigation-architecture`. ## Tuist wiring: a dedicated scheme, not a test plan (Assumes a Tuist-generated project — see `build-time-secret-injection`'s Tuist-assumption note; a hand-maintained `.xcodeproj` adds the same dedicated scheme directly in Xcode's scheme editor instead of via `Project.swift`.) A Tuist `.uiTests` product target needs **its own scheme** with an explici