Testa

io.github.valewnrt由 GitHub 账号 valewnrt 发布v0.2.2更新于 Oct 24, 2026

Drive the iOS Simulator from an agent: read the screen, tap/type/swipe, replay flows in CI.

已验证STDIO仅桌面浏览器自动化开发者工具

概览

AI 生成的概览

让 AI 助手操控 iOS 模拟器:以文本读取屏幕、点击、输入、滑动、校验结果,并可录制流程在 CI 中回放。

可以做什么
  • 以紧凑文本读取模拟器屏幕,包含无障碍元素,缺失时回退到 OCR
  • 执行点击、输入、滑动、长按、拖拽、捏合、旋转、多点触控和硬件按键
  • 对元素标签做断言,并查看每次操作后的界面变化
  • 启动模拟器、安装并运行应用
  • 把助手操作录制为流程文件,并以 JUnit 输出回放
适用场景
适合让助手在模拟器中测试或探索 iOS 应用而无需添加 testID,或希望先录制一次运行、之后在 CI 中不依赖模型回放。
运行要求
macOS 与 Xcode 26(iOS 26 模拟器);需本地安装二进制(Homebrew 或源码构建),或使用 npx 运行 npm 包。可选环境变量 TESTA_MCP_FULL(暴露全部 40 个工具而非默认 13 个)与 TESTA_UDID(指定模拟器)。无网络、无遥测。
安装前请注意
它用真实触摸事件操控模拟器,并可安装和启动应用,助手操作会改变模拟器状态。它依赖 Apple 私有框架,新版 Xcode 可能导致失效;目前为 1.0 之前版本,仅支持 iOS 模拟器,不支持真机与 Android。

安装

在 SourceWeft 中

  1. 打开 控制台中的 Testa,将其添加到工作区。
  2. 为需要使用其工具的对话启用该服务。

Desktop only,通过 STDIO。 STDIO 服务会启动本地进程,因此需要 SourceWeft 桌面宿主。

其他 MCP 客户端

参照 仓库 中的启动说明。

README

Testa

Let your AI agent test your iOS app.

[CI] [Xcode beta] [Release] [License: MIT]

Testa gives Claude Code, Codex, Cursor or any MCP client eyes and hands in the iOS Simulator. It reads the screen as compact text, taps, types and swipes with real touch events, and checks the result. It works with React Native, Expo and SwiftUI apps, and you don't have to add a single testID. When the agent is done, save the run as a flow file and replay it in CI without a model.

[Terminal running testa tap, pinch, rotate, dragdrop, typein, tapocr and assert next to the iOS Simulator, which reacts to each command]

Install

Requires macOS with Xcode 26 (iOS 26 simulators).

bash
brew tap valewnrt/testabrew install testatesta setup        # installs the Claude Code skill and registers the MCP server

Or build from source: git clone https://github.com/valewnrt/testa && cd testa && ./install.sh.

Connect your agent

testa setup already configures Claude Code. For other agents:

bash
codex mcp add testa -- testa mcp      # Codex
json
{ "mcpServers": { "testa": { "command": "testa", "args": ["mcp"] } } }

The JSON goes into Cursor's .cursor/mcp.json or any other MCP client config. Then ask your agent something like "Launch the app in the simulator, sign up with a test account and check that the welcome screen appears." More in docs/agents.md.

Try it yourself

Testa is a plain CLI, so you can drive it by hand too:

console
$ testa boot "iPhone 17 Pro"$ testa install ./MyApp.app && testa launch com.example.myapp
$ testa ui19 elements (on screen)e2 StaticText "ready" #status @201,89e5 Button "Tap me" #tapButton @102,171e18 TextField #textInput =type here @201,601…
$ testa tap "Tap me"tapped e5 Button Tap me-- ui changes --~ e2 StaticText "tap:1" #status @201,89~ e6 StaticText "count: 1" #tapCount @41,208
$ testa assert "#status" label=tap:1PASS label tap:1

The first command starts a background daemon (a few seconds, once). After that, each command takes about 60 ms.

What makes it different

  • No app changes needed. Testa reads the accessibility tree and falls back to on-device OCR (Apple Vision) for anything that isn't in it: system sheets, canvas-drawn screens, games, WebViews. More →
  • Built for token budgets. A screen is one line per element, about 200 tokens instead of about 1,500 for a screenshot, and every action replies with only what changed. Benchmark →
  • Record once, replay in CI. testa flow record turns what the agent did into a plain-text flow file. testa flow run replays it with JUnit output and failure artifacts, and there's a GitHub Action. More →
  • Real gestures and device control. Tap, long-press, swipe, drag-and-drop, pinch, rotate, multi-touch and hardware buttons, plus push notifications, location, Face ID, dark mode, Dynamic Type and more.
  • One local binary, no dependencies. Testa talks to Apple's simulator frameworks directly: no Node, no Python, no WebDriver server. No network, no telemetry. How it works →

Status

Testa is pre-1.0 and is used against real production apps. It relies on private Apple frameworks, so a new Xcode can break it; a weekly job runs the suite against Xcode betas so breakage shows up early. Verified on Xcode 26.4 with iOS 26.4 simulators. iOS Simulator only: no real devices, no Android (why).

Documentation

Contributing

Bug reports, Xcode-compatibility reports and pull requests are welcome. Start with CONTRIBUTING.md; questions and ideas go to Discussions. Changes are listed in the CHANGELOG.

Acknowledgements

Testa's HID and accessibility work was informed by studying Meta's idb (MIT); no idb code is linked or bundled. Thanks to everyone who has contributed.

License

MIT

来源:README.md,提交 69e717a

工具

0
SourceWeft 尚未在沙箱中启动过该软件包,因此其工具未知。

版本历史

2
  1. v0.2.2最新Oct 9, 2026
  2. v0.2.1Sep 16, 2026

评分

已满足适用检查项的 50%

该评分衡量此收录条目的完整程度,依据注册中心条目、端点与公开来源计算得出。它不是对服务器本身的评价,也不表示服务器安全或当前可用:可连通性是带日期的检查结果,评分也不包含安装量或用户评价。

  • 近 30 天内可连通25 分

    请保持端点能够响应 MCP 握手;SourceWeft 每 30 天探测一次。

  • 已声明认证方式10 分

    请在注册中心条目中声明凭据请求头,或保持端点能够响应探测,以便判定其认证方式。

  • 已列出工具15 分

    请让服务器在无凭据时响应 tools/list,或发布可在沙箱中无凭据启动的软件包。

  • 描述必需15 分
  • 图标10 分
  • 文档15 分
  • 许可证10 分