ce-test-xcode
everyinc/compound-engineering-plugin
使用 XcodeBuildMCP 在模拟器上构建和测试 iOS 应用。
...展开全部关于 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 登录、推送通知、应用内购买、相机和照片以及位置),它会暂停以获取人工输入,通过平台的阻塞问题工具进行询问,并且绝不会静默跳过验证。
测试失败后它会做什么?
它通过错误状态的屏幕截图、捕获的控制台日志和复现说明来记录失败情况,然后询问是立即修复(调试、提出修复方案、重新构建和重新测试)还是跳过并继续测试其他屏幕。
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, orPARTIALplus project, scheme, simulator, build result, per-surfacePASS/FAIL/SKIP, console errors, human checks, and residual failures. - Per-surface status is derived from evidence, not the user's routing choice.
PASSrequires completed passing evidence.FAILrecords observed failing evidence until a completed retest replaces it.SKIPmeans the check has no completed outcome. - The overall result is
FAILwhile any failure remains,PARTIALwhen no failure remains but a scoped check is skipped, and otherwisePASS. - 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
- 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. - 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.





首页
