選項
首頁首頁 Skill MCP 工具 ce-test-xcode

使用 XcodeBuildMCP 在模擬器上構建和測試 iOS 應用。

...展開全部
11
更新時間 2026-08-27

關於 ce-test-xcode

Ce-test-xcode 使用 XcodeBuildMCP 伺服器在模擬器上構建、安裝和測試 iOS 應用,捕獲螢幕截圖和日誌,並驗證應用行為。它接受一個可選的方案(scheme)名稱引數,或者使用 "current" 來使用預設或上次使用的方案。前提條件包括帶有命令列工具的 Xcode、已連線的 XcodeBuildMCP MCP 伺服器、有效的 Xcode 專案或工作區,以及至少一個可用的 iOS 模擬器。模型呼叫已禁用,因此它作為顯式命令執行。

工作流程首先透過呼叫其 list_simulators 工具來驗證 XcodeBuildMCP 是否已連線,如果未連線則停止並提供安裝指導。然後它發現專案和方案(discover_projs, list_schemes),透過 UUID 啟動首選模擬器(如 iPhone 15 Pro),並使用 build_ios_sim_app 構建應用,如果失敗則報告具體錯誤。成功後,它安裝並啟動應用(install_app_on_simulator, launch_app_on_simulator)並開始捕獲日誌。對於每個關鍵螢幕,它擷取描述性螢幕截圖,審查渲染和內容,並檢查日誌中是否有崩潰、異常、錯誤級別訊息和失敗的請求。

該技能記錄了一個已知的平臺限制:在帶有內聯 AttributedString 連結的 SwiftUI Text 檢視上,模擬點選無法觸發手勢識別器,因此它提示手動點選,或提供 xcrun simctl openurl 作為回退方案。對於需要裝置互動的流程(包括 Apple 登入、推送通知、應用內購買、相機和照片以及位置),它會暫停以進行人工驗證,使用平臺的阻塞問題工具(如 AskUserQuestion)。在測試失敗時,它會記錄帶有螢幕截圖和日誌的錯誤,並詢問是立即修復還是跳過。最後,它生成結構化的測試摘要表,並執行清理步驟,停止日誌捕獲,並可選擇關閉模擬器。它還整合了 ce-code-review 工作流,該工作流可以生成一個代理,在觸及 iOS 程式碼的 PR 上執行此技能。

常見問題解答

此技能需要哪個 MCP 伺服器?

它需要連線 XcodeBuildMCP MCP 伺服器。工作流程透過呼叫其 list_simulators 工具來確認可用性,在 XcodeBuildMCP 正常工作之前不會繼續執行,如果缺失則提供 Homebrew 和 npx 安裝說明。

我如何選擇要測試的方案?

將方案名稱作為引數傳遞,或者傳遞 "current" 以使用預設或上次使用的方案。該技能透過 discover_projs 和 list_schemes 發現專案和方案,如果提供了引數則使用它。

為什麼模擬器中的 SwiftUI 文字連結點選無效?

在帶有內聯 AttributedString 連結的 SwiftUI Text 檢視上,模擬點選不會觸發手勢識別器,因為這些連結在輔助功能樹中未作為單獨元素暴露。該技能提示您手動點選,並可以使用 xcrun simctl openurl 直接開啟已知目標 URL 作為回退方案。

它在何時暫停以獲取人工輸入?

對於需要真實裝置互動的流程(如 Apple 登入、推送通知、應用內購買、相機和照片以及位置),它會暫停以獲取人工輸入,透過平臺的阻塞問題工具進行詢問,並且絕不會靜默跳過驗證。

測試失敗後它會做什麼?

它透過錯誤狀態的螢幕截圖、捕獲的控制檯日誌和復現說明來記錄失敗情況,然後詢問是立即修復(除錯、提出修復方案、重新構建和重新測試)還是跳過並繼續測試其他螢幕。

在 GitHub 上查看

Build and exercise an iOS app on a simulator, preserving screenshots, logs, human-verification results, and failures as evidence for the user.

Done:

  • A completed run reports overall PASS, FAIL, or PARTIAL plus project, scheme, simulator, build result, per-surface PASS / FAIL / SKIP, console errors, human checks, and residual failures.
  • Per-surface status is derived from evidence, not the user's routing choice. PASS requires completed passing evidence. FAIL records observed failing evidence until a completed retest replaces it. SKIP means the check has no completed outcome.
  • The overall result is FAIL while any failure remains, PARTIAL when no failure remains but a scoped check is skipped, and otherwise PASS.
  • Any failure before the launched-with-log-capture handoff stops later stages and reports an actionable setup blocker with its evidence.

Boundaries: this skill tests and reports. Diagnosis and any user-approved product fix belong to ce-debug, invoked with authority narrowed to return here without committing, pushing, or opening a PR. Keep simulator interaction within the app and flows the user placed in scope.

Run

  1. Prepare and launch. Read references/setup-and-build.md. It owns the XcodeBuildMCP availability gate, project and scheme discovery, simulator choice, build, install, launch, and log-capture start.
  2. Exercise and report. After launch, read references/test-and-report.md. It owns per-screen evidence, human-only flows, the SwiftUI inline-link automation limitation, failure routing, cleanup, and the fixed summary fields.

Do not replace either required read with remembered tool names. XcodeBuildMCP adapters differ by host, while their observable success conditions do not.

所有檔案

1 個檔案

安裝 ce-test-xcode

下載並將技能檔案解壓至你的 .claude/skills/ 目錄。

下載 ZIP

複製儲存庫並將技能檔案複製到您的專案中。

git clone https://github.com/EveryInc/compound-engineering-plugin/blob/main/skills/ce-test-xcode/SKILL.md # Copy SKILL.md to your .claude/skills/ directory

複製 複製
快速設定: 將技能資料夾複製到 .claude/skills/,Claude 將自動檢測並使用該技能

相關技能

office-mcp
更新時間 2026-07-13
mcpgraph
更新時間 2026-06-29
composio
更新時間 2026-06-29
connect-mcp-server
更新時間 2026-06-29
OR