# Xcode MCP Tests

> Discover and run tests from Xcode's active scheme and active test plan through Xcode MCP. Use when the user asks to run all tests, run selected XCTest cases, list available tests, or verify test behavior in the currently open Xcode project.

- Skill: `ai-x-builder/xcode-mcp-tests` (Agent Skill, multi-file: 2 files)
- Install (CLI): `npx skillmds@latest add ai-x-builder/xcode-mcp-tests`
- Raw SKILL.md: https://api.skillmd.com/api/skills/ai-x-builder/xcode-mcp-tests/raw
- Safety review: pending
- Works with: Claude Code, Claude.ai, OpenAI Codex
- Category: AI & ML
- Author: ai-x-builder (https://skillmd.com/u/ai-x-builder)
- Updated: 2026-09-22
- Page: https://skillmd.com/skills/ai-x-builder/xcode-mcp-tests

---


# Xcode MCP Tests

## Overview

Run tests through Xcode itself, using the active scheme and test plan from the selected Xcode tab.

## Tool Availability

Before calling MCP tools, confirm the `mcp__xcode` namespace is available. If it is not available, use `tool_search` to expose Xcode MCP tools; if the tools still are not available, tell the user Xcode MCP is not connected and stop rather than running tests through another path.

## Workflow

1. Discover Xcode tabs with `mcp__xcode.XcodeListWindows`.
2. Select the `tabIdentifier` for the requested workspace/project.
3. If the user asks to list tests or run a named subset, call `mcp__xcode.GetTestList` first.
4. For the full active test plan, call `mcp__xcode.RunAllTests`.
5. For selected tests, call `mcp__xcode.RunSomeTests` with exact `targetName` and `testIdentifier` values from `GetTestList`.
6. After a test run, inspect failures with `mcp__xcode.GetBuildLog` and `mcp__xcode.XcodeListNavigatorIssues` when needed.

## Test Selection

- Use `GetTestList` output fields directly; do not guess XCTest identifiers from display names.
- If `GetTestList` returns a `fullTestListPath`, use shell search tools on that file only when the returned list is truncated or the requested test is not in the first page.
- If the user gives a file or class name, map it to matching `TEST_TARGET` and `TEST_IDENTIFIER` entries before calling `RunSomeTests`.

## Reporting

- State whether all requested tests ran, passed, failed, or could not be started.
- Include failed test identifiers and the highest-signal assertion or compile errors.
- If no tests are available from the active scheme/test plan, report that Xcode MCP found no tests for the selected tab.

## Constraints

- Do not infer a different scheme, destination, or test plan; this MCP runs the active Xcode configuration.
- If a specific test cannot be mapped exactly, ask for clarification or list close matches rather than running a broad suite unexpectedly.

