Test Buddy (tb)
Fast, event-driven UI tests for Android, iOS and the web, built for people and for AI coding
agents. tb runs Maestro-compatible YAML flows (your existing Maestro
flows run unchanged), drives several devices in one test, and lets an agent drive a device
straight from a shell, then save what worked as a test.
Why
- Maestro-compatible. Maestro's YAML format: every command, selector, condition,
runFlow, repeat, retry, JavaScript (${}, runScript, output, http), env
rules, config.yaml, tags, JUnit/HTML reports and the same command-line options. Maestro
flows run unchanged, .maestro folders and MAESTRO_* variables included. Web flows
(url:) run in Chrome, with CSS selectors and iframes.
- Fast. The same journey takes tb 12.3 s on Android and 18.1 s on iOS, against
Maestro's 4–6 minutes, and Maestro's own sample suites run 1.6 to 9.6 times faster
(Speed).
- No polling. On-device agents (and an in-page script on the web) push "the UI changed"
and "the UI settled" events, and tb waits on those. Screens that never stop moving
(spinners, tickers) do not hold it up: an element that keeps changing is marked restless.
Taps wait for a still screen and steer around sticky bars and the keyboard
(details).
- Many devices. Spread a suite over devices with one work queue, or write one flow that
drives an iPhone, an Android phone and a browser together, in step with each other.
- Agent first. A CLI, not a server to set up (MCP is there if you want it). A screen is a
few hundred tokens, every command answers with what changed, a failure says why and what
to try, and the commands that worked save as a flow. A skill teaches Codex, Gemini CLI,
GitHub Copilot, Cursor and Claude Code to use it.
- Knows your app.
tb map crawls an app once into a map of its screens, so an agent can
reach any screen by name, write the flow that gets there, and check what a button leads to.
- One binary. 27 MB (a 15 MB download) for macOS, Windows and Linux, both device agents
built in. No Java or Node runtime, no driver server.
Install
Download. One binary with the Android and iOS agents built in, no Go needed. Get the
archive for your system from the latest release
(macOS, Windows and Linux; checksums.txt has their SHA-256 sums).
macOS (Apple silicon; on an Intel Mac use tb_darwin_amd64):
curl -fsSL https://github.com/Elforama/testbuddy/releases/latest/download/tb_darwin_arm64.tar.gz | tar -xz
sudo mkdir -p /usr/local/bin && sudo mv tb_darwin_arm64/tb /usr/local/bin/
tb version
The binary is not signed by Apple. Fetched with curl as above it runs as is. If you
download the archive in a browser instead, macOS refuses to open tb ("Apple could not
verify..."); clear the download's quarantine flag once:
xattr -d com.apple.quarantine /usr/local/bin/tb
Windows 10 or later, in PowerShell (on an Arm PC use tb_windows_arm64):
Invoke-WebRequest https://github.com/Elforama/testbuddy/releases/latest/download/tb_windows_amd64.zip -OutFile tb.zip
Expand-Archive tb.zip -DestinationPath "$env:LOCALAPPDATA\Programs" -Force
$dir = "$env:LOCALAPPDATA\Programs\tb_windows_amd64"
[Environment]::SetEnvironmentVariable("Path", [Environment]::GetEnvironmentVariable("Path", "User") + ";$dir", "User")
Open a new terminal, then tb version. If you downloaded the zip in a browser and Windows
blocks tb.exe, run Unblock-File "$dir\tb.exe". On Windows, tb runs Android and web
flows; iOS needs macOS and Xcode.
Linux: the same as macOS with tb_linux_amd64 or tb_linux_arm64.
Go. With Go 1.27+:
go install github.com/elforama/testbuddy/cmd/tb@latest
tb version
@latest is the newest release; @main builds the newest commit. tb lands in
$(go env GOPATH)/bin, so put that on your PATH. Keep the module path lowercase
(github.com/Elforama/... fails). To build from a clone instead, see
building from source.
Claude Code plugin. The tb CLI plus a tb skill for Claude. The bundled tb runs on
Apple silicon Macs only; elsewhere, install the CLI from a download or with go install
above.
claude plugin marketplace add Elforama/testbuddy
claude plugin install test-buddy@test-buddy
Or from inside Claude Code: /plugin marketplace add Elforama/testbuddy, then
/plugin install test-buddy@test-buddy.
Devices. Start an Android emulator (or plug in a phone with USB debugging), boot an iOS
simulator, or have Google Chrome installed. With no device running, tb test -p android or
-p ios starts one. More in docs/setup.md.
Quick start
tb doctor # what is ready (adb, devices, Xcode, simulators, Chrome), and the fix
tb init # give tb to the coding agents here (MCP server and skill)
tb devices # what tb can drive, and which are free or in use (by whom)
tb test login.yaml -p android # run one flow on Android (-p or a device is required)
tb test flows/ -p ios # every flow in a folder, on an iOS simulator
tb test flows/ -p web --headless # web (url:) flows in headless Chrome
tb check --lint flows/ # check syntax and list fragile steps, no device needed
A flow is Maestro YAML:
appId: com.android.settings
---
- launchApp
- tapOn: "Network & internet"
- assertVisible: "Internet"
Features
Run tests (docs/running-tests.md)
tb test with Maestro's options (env -e, tags, JUnit and HTML reports), plus --json.
--shard-split / --shard-all spread a suite over devices; --retries re-runs a failed
flow, on another device when one is free; --from 12 starts a flow at a step.
- A failed step prints the screen as it was and the elements most like what it looked for,
says if the app crashed (with its error log), and leaves a debug folder: screenshot,
listing, hierarchy and
log.txt, what tb did at each step.
--timeline: one HTML page per flow, every step with the screen before and after it and
each tap drawn where it landed.
--record films each flow into the reports; --annotate makes a video a person can follow
(captions, touches drawn, steps held a moment), and can show your app's tracking calls or
webhooks on it as they fire (tb mark).
tb check --lint flags steps that run but break easily (coordinates, indexes, accidental
regexes, flows that assert nothing).
- Web:
mockNetwork answers requests without a server (empty lists, errors, slow responses),
answerDialogs and assertDialog handle alert/confirm/prompt, and new tabs are
followed.
- tb-only commands:
drag (long-press drag and drop, list reorders), scrollUntilVisibleIn
(a list inside a scrolling page).
Drive a device, for agents and people (docs/driving.md)
tb open -p android --name alice --app com.example.app # launch the app, print its screen
tb do 'tapOn: @7' 'inputText: "user@example.com"' 'tapOn: "Next"' # run steps, see what changed
tb save flows/sign-in.yaml # the steps that passed, as a flow
tb replay flows/sign-in.yaml -d DEVICE # check it once, from its launch
android 1080x2400 com.android.settings, 11 elements
@1 Button "Search Settings" #search_action_bar
@3 Button "Network & internet, Mobile, Wi‑Fi, hotspot"
@16 Switch #switchWidget unchecked
...
tb look: the screen as one line per element, with @refs, layout where it matters, and
what scroll areas hide. tb do answers with + new, ~ changed, - gone.
tb read "Total": the value shown for a label (a switch, a field, "Label: value"),
touching nothing. tb collect: scroll a list and print each row once.
tb wait, tb watch: wait for or stream changes, on device events.
tb locate: every match of a selector and the one tb would pick.
tb do --secret PW 'inputText: ${PW}' types a password without tb showing or keeping it.
tb save --path inbox, then tb go inbox in any later session: back on that screen in
one call.
- Saved flows use stable selectors, not coordinates or match indexes;
tb save --preview
warns about fragile steps first.
- A failed replay names the step and finishes from there with
--from.
tb applog: the app's crash and error log. tb shot: a screenshot.
- One tb per device: a run or session locks it, and a second is refused, saying who holds it.
Map an app
tb map -d emulator-5554 --app com.example.app --time 10m # crawl it once
tb map show # one line per screen: id, name, aliases
tb map go "Settings" -d alice # take the device there
tb map path "Settings" -o flows/settings.yaml # a flow from launch to that screen
tb map leads "Save" --on "Edit item" --to "Items" --run # does this button lead there?
tb map check -d alice # walk every link again, list what changed
The crawl taps every action on every screen, scrolls for the rest, and never taps labels
like delete, pay, send or sign out. Stop it and run it again: it continues. Screens are
found by their title, the button that opens them, names of your own and aliases
(tb map alias "basket, cart" --screen s7); a name that fits several screens, or none,
lists the closest. --inputs fills forms (secrets as ${NAME}), --start-flow login.yaml
maps what is behind a sign-in, and tb map diff compares two crawls. All options: tb map -h
and the CLI reference.
Check app code (docs/a11y.md)
tb a11y reads app source, with no device, and lists elements tb could not find or tap,
each with its fix; --changed checks only a PR's lines, --format github annotates them,
and --fix adds the missing ids. It reads Android layouts, Jetpack Compose, SwiftUI/UIKit,
React Native, Flutter and web code.
Multi-device flows (docs/multi-device.md)
name: Alice messages Bob
devices:
alice: { platform: ios, appId: com.example.chat }
bob: { platform: android, appId: com.example.chat }
---
- parallel:
alice: [launchApp, { runFlow: login.yaml }]
bob: [launchApp, { runFlow: login.yaml }]
- alice:
- tapOn: "New message"
- inputText: "Hi Bob"
- tapOn: "Send"
- signal: sent
- bob:
- waitForSignal: sent
- assertVisible: "Hi Bob"
Use with AI coding agents
tb init # MCP server for Claude Code, Codex and Gemini CLI, plus the skill
tb skill install # just the skill, e.g. after updating tb
tb skill install --project # .agents/skills/tb and .claude/skills/tb here, to commit
The tb skill teaches an agent the workflow (look, act, save,
replay, map), with the full CLI reference, flow format, gotchas and debugging guide in
references/. It follows the open Agent Skills
format. tb skill install writes the copy that matches your tb to:
| Folder |
Read by |
~/.agents/skills/tb |
Codex, Gemini CLI, GitHub Copilot (CLI, VS Code, Visual Studio), Cursor (Codex · Gemini CLI · GitHub Copilot · Cursor) |
~/.claude/skills/tb |
Claude Code, written when Claude Code is installed and the test-buddy plugin is not (with the plugin, an earlier copy is removed) |
It replaces only a folder it wrote (it leaves a .tb-skill file there), so a tb skill of
your own, this repository's .agents/skills/tb, or a link is left as it is. The agent needs a
shell on a machine with tb and the device tools or browser. More: docs/setup.md.
- MCP:
tb mcp serves the same over stdio (tools: devices, open, look, locate,
read, collect, run, wait, save_flow, go, app_log, map, close). For a
client tb init does not cover, add an MCP server whose command is tb with the argument
mcp.
- Any agent:
tb agent-guide prints a short CLI reference for AGENTS.md or a prompt.
- Claude Code plugin:
plugin/ holds the tb CLI (Apple silicon) and the skill
(Install). From a clone: claude --plugin-dir plugin. After changing tb,
scripts/build-plugin.sh refreshes it; edit the references in
.agents/skills/tb/references/, which the script copies.
Speed

| Platform |
tb |
WebdriverIO |
Maestro |
| Android (emulator, Android 16) |
12.3 s (11.9–12.5) |
24.6 s (24.2–25.0) |
359.4 s (347.3–369.8) |
| iOS (iPhone 17 simulator) |
18.1 s (17.8–18.5) |
43.3 s (43.1–43.5) |
295.4 s (293.4–297.2) |
| Web (headless Chrome) |
7.4 s (7.3–7.5) |
4.4 s (4.2–4.5) |
236.3 s (231.6–239.8) |
The bench journey (bench/): sign in through a spinner, open and edit an
item, scroll a list that loads more, and act on screens that never stop moving (a ticker, a
per-frame stopwatch). The same app is built for Android, iOS and the web. Each number is
the mean (min–max) of 5 timed runs of the whole command after a warm-up, start-up included,
one run at a time on one Mac on 2026-11-26, with each tool's defaults and the same 17 s
element timeout. Versions: tb 0.7.0, Maestro 2.12.1, WebdriverIO 10.2.0 (through Appium
4.0.1 on Android and iOS). The Mac also had other emulators and simulators running, so
every tool's times are a little higher than on a quiet machine.
- Maestro waits for the screen to stop changing after each step; the bench's screens
never do, which most likely accounts for most of its time.
- WebdriverIO is faster on the web because it does not wait for the page to settle: it
clicks the moment an element is displayed, even while a screen is still sliding in. With
a click instrument on the bench page, 7 of its 120 runs clicked the wrong element, 5 of
them still reporting a pass. tb waits for a still screen before each tap and never tapped
during a slide-in; the same instrument did catch a scrolling race in tb (12 of 52 runs
tapped one row off), fixed since: 0 wrong taps in the 15 runs after the fix
(bench/README.md).
On Android and iOS its journey needs a 1 s pause after scrolling, without which the tap
only stops the still-moving list: without the pause, 4 of 5 Android runs failed (on
WebdriverIO 9.32.0).
On the sample suites in Maestro's own repository, run unchanged (--include-tags passing),
mean (min–max) of 5 runs on 2026-11-27, tb built from main and Maestro 2.12.1; every run of
both passed:
| Suite |
tb |
Maestro |
| Wikipedia, 2 flows, Android 16 emulator |
18.8 s (18.7–18.8) |
44.2 s (43.8–44.9) |
| Wikipedia, 2 flows, iPhone 17 simulator |
46.7 s (46.4–47.0) |
73.0 s (71.9–74.0) |
| Web view app, 1 flow, iPhone 17 simulator |
5.6 s (4.8–6.5) |
17.6 s (17.2–18.1) |
| Web pages, 14 flows, headless Chrome |
13.7 s (13.3–13.9) |
131.9 s (131.1–132.5) |
How it compares
Checked on 2026-11-02 against Maestro 2.12.1 and WebdriverIO 10.1.0 (with Appium 3 for
mobile), from their docs and release notes (sources).
|
tb |
Maestro |
WebdriverIO |
| Dependencies |
|
|
|
| Install |
One 27 MB binary (15 MB download), both device agents built in |
Java 17+ and the CLI (~350 MB download) |
Node 22+, an npm init wdio project (Mocha, Jasmine or Cucumber); for mobile, Appium 3 and a driver per platform |
| Android also needs |
adb |
adb (Android SDK) |
Android SDK (ANDROID_HOME), a JDK (JAVA_HOME), the UiAutomator2 driver |
| iOS also needs |
Xcode, a booted simulator |
Xcode and its command line tools |
Xcode, the XCUITest driver; WebDriverAgent is built with xcodebuild per session by default |
| Web also needs |
Chrome |
Nothing (downloads its own Chromium) |
Nothing for Chrome and Firefox (downloads them and their drivers); Safari's driver comes with macOS |
| Put on the device |
An agent (Android: its accessibility service is on only while tb runs; iOS: an XCUITest runner) |
Driver APKs (Android), an XCTest runner (iOS) |
UiAutomator2 server, its test APK and Appium Settings (Android); WebDriverAgent (iOS) |
| Tests are written as |
YAML flows (Maestro's format) |
YAML flows |
JavaScript / TypeScript |
| Platforms |
|
|
|
| Android emulator / device |
✅ / ✅ |
✅ / ✅ |
✅ / ✅ |
| iOS simulator / real iPhone |
✅ / ❌ |
✅ / ❌ |
✅ / ✅ (signing and Developer Mode needed) |
| Web |
Chrome |
Chromium (beta) |
Chrome, Firefox, Edge, Safari |
| Multi-device |
|
|
|
| One test drives several devices at once |
✅ One YAML file with device roles; iOS, Android and web can mix |
❌ Not supported (open feature request); run separate processes from a script |
✅ Multiremote, in code |
| Sync between devices |
✅ signal / waitForSignal, shared output |
❌ |
In code (one side waits for the other's result) |
| Spread a suite over devices |
✅ --shard-split, --shard-all (one work queue) |
✅ --shard-split, --shard-all |
✅ maxInstances, --shard |
| AI agents |
|
|
|
| Shell session for agents (screen as text, refs, what changed) |
✅ tb open, look (one line per element, @refs), do (prints what changed), wait, watch, save (as a flow) |
One-shot maestro hierarchy (JSON, or CSV with --compact) |
✅ wdio session (v10): element refs, export to a spec |
| MCP server |
✅ tb mcp (optional; the CLI is enough) |
✅ maestro mcp |
✅ @wdio/mcp; Appium has appium-mcp |
| Agent skill / plugin |
✅ A tb skill for Codex, Gemini CLI, GitHub Copilot, Cursor and Claude Code (tb skill install), a Claude Code plugin (plugin/), tb agent-guide for AGENTS.md |
None official (docs publish llms.txt) |
Agent skills (wdio-session) and an AGENTS.md section from npm init wdio; no Claude Code plugin |
| AI steps in tests |
❌ |
Experimental (assertWithAI, ...); needs a free Maestro Cloud account |
@wdio/ai-service (act, extract) with your own model |
Sources
- Maestro: install,
how it works,
web (beta),
real iOS devices (#686),
multi-device (#2563),
sharding,
MCP,
AI test analysis,
changelog.
- WebdriverIO: getting started,
driver binaries,
Appium service,
multiremote,
sessions, MCP,
AI agents, AI service,
v10 release.
- Appium: requirements,
UiAutomator2 setup,
XCUITest requirements,
appium-mcp.
More
License
Copyright 2026 Jonathan Muller. Licensed under the Apache License 2.0.