/hearth:hearth-devicesfrom TestZeus Hearth
Manages Android emulators and iOS simulators in a TestZeus Hearth farm for Appium testing. Covers adding Mac hosts, planning simulators, draining/removing hosts, in-cluster emulator pods, app upload by hash, and Appium capabilities.
Ships in TestZeus Hearth. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
Appium clients use the same /wd/hub as Selenium. With platformName Android or iOS, the
gateway picks a device from a device pool, installs the app, and opens an Appium session.
iOS capacity grows by adding Macs, not Kubernetes nodes. Adding one is one command on the farm side and one pasted line on the Mac.
Docs: https://test-zeus-ai.github.io/testzeus-hearth/guide/hosts/ and https://test-zeus-ai.github.io/testzeus-hearth/guide/devices/
~/.config/hearth-agent/, mode 0600).hearth hosts remove stops sessions still running on that host.403 not_admin otherwise). The chart's default
team is admin; hearth keys create <team> --admin makes another.| Need | Source |
|---|---|
| iOS simulators | A Mac with Xcode, added with hearth hosts add (the only option) |
Android, cluster nodes have /dev/kvm (bare metal or nested virtualisation) | Emulator pods: cluster: on a DevicePool in the chart values (section 5) |
| Android, no KVM in the cluster | A Mac or a Linux host with KVM, added with hearth hosts add |
| iOS | Android (optional) | |
|---|---|---|
| Host | macOS with Xcode and at least one iOS simulator runtime | macOS, or Linux with KVM |
| Tools | xcrun simctl, plutil (come with Xcode) | Android SDK (platform-tools, emulator, build-tools), an AVD |
| Appium | appium with the xcuitest driver | appium with the uiautomator2 driver |
| Other | A prebuilt WebDriverAgent (recommended) | ffmpeg for the live view |
Check on the Mac:
xcrun simctl list runtimes # at least one iOS runtime
appium --version && appium driver list --installed
Simulators need a logged-in user: the agent runs as a login service of that user.
From a machine with the CLI (or the web UI's Hosts page):
hearth hosts add mac-1 # --like mac-0 copies another Mac's devices; --wait waits for it
It prints one line to run in Terminal on the Mac:
curl -fsSL <farm>/join.sh | sh -s -- <farm> <join-code>
That installs hearth-agent if missing, trades the code for the host's own token, saves
~/.config/hearth-agent/agent.toml, and starts the agent as a login service (macOS LaunchAgent,
Linux systemd user unit). Log: ~/Library/Logs/hearth-agent/agent.log.
The <farm> URL must be one the Mac can open: for a remote farm, run hearth hosts add with
--url https://<farm address> (or HEARTH_URL), not localhost.
The farm calls the agent back on port 4800, at the Mac's address on the route to the farm (for a
farm on localhost, such as kind on the same Mac, at host.docker.internal). If the farm reaches
the Mac by another address (NAT, VPN, tunnel), add --advertise http://<address>:4800 to the
pasted line.
hearth hosts devices mac-1 # iOS runtimes, device types and AVDs the Mac has, and capacity
hearth hosts plan mac-1 "iPhone 17@iOS 27.2=3" "iPad Air 11-inch (M4)@iOS 27.2=1"
hearth hosts plan mac-1 android:Pixel_8_API_35=2 "iPhone 17@iOS 27.2=2"
hearth hosts plan mac-1 pool:iphone-17-ios-27-2=4 # a pool the farm already has
hearth hosts plan mac-1 --clear # no devices
iphone-17-ios-27-2); "... as my-pool" names it. Other Macs with the same line share the pool.plan_does_not_fit.Verify: hearth hosts (status online, devices), then hearth status (pool READY >= 1).
| Task | Command |
|---|---|
| See all hosts, capacity use, unreachable ones | hearth hosts, hearth hosts show mac-1 |
| Another Mac like mac-1 | hearth hosts add mac-2 --like mac-1 |
| Maintenance: no new sessions, running ones finish | hearth hosts drain mac-1 (status drained = safe to switch off) |
| Back in service | hearth hosts resume mac-1 |
| Reconnect (reinstalled Mac, new disk, moved) | hearth hosts join-code mac-1 (alias reconnect), paste the new line |
| Remove (revokes its token) | hearth hosts drain mac-1, wait for drained, hearth hosts remove mac-1; on the Mac hearth-agent uninstall |
| Symptom | Fix |
|---|---|
waiting | The join line was not run, or the code expired (1 hour): hearth hosts join-code <host> |
bad_join_code on the Mac | Code used or expired: make a new one |
UNREACHABLE / reachError | The farm cannot call http://<mac>:4800: open the port in the macOS firewall, or rejoin with --advertise http://<address>:4800 |
offline | Mac asleep, rebooted to the login window, or agent stopped: log in; read ~/Library/Logs/hearth-agent/agent.log |
Runtime not in hearth hosts devices | Install it in Xcode > Settings > Components; the agent reports it within a minute |
plan_does_not_fit | Fewer devices, a bigger Mac, or another Mac (hearth hosts add mac-2 --like mac-1) |
hearth status hint: requests waiting with no free device | Add a Mac or more devices to that pool |
403 not_admin | Use an admin team's key (hearth keys create <team> --admin) |
Devices never download apps from URLs. Upload once, use the hash:
hearth app upload app-debug.apk # Android: .apk
hearth app upload MyApp.app.zip # iOS simulator: a zipped .app (not .ipa)
It prints hearth:app:<sha256>. Same bytes, same reference: uploading again is harmless. Apps
belong to the uploading team. Limits: 2 GiB; names of letters, digits, spaces, ., -, _.
For iOS, build for the simulator (xcodebuild -sdk iphonesimulator ...) and zip the .app.
{
"platformName": "Android",
"appium:automationName": "UiAutomator2",
"appium:app": "hearth:app:9f2c...",
"appium:deviceName": "Pixel",
"appium:platformVersion": "15",
"hearth:options": { "pool": "pixel8" }
}
How a device is picked: hearth:options.pool by name; otherwise pools of that platform whose
deviceName contains appium:deviceName (case-insensitive) and whose osVersion equals or starts
with appium:platformVersion; the highest osVersion wins.
The farm drops capabilities that touch the host or fetch things (udid, app URLs, otherApps,
ports, webDriverAgentUrl, derivedDataPath, avd, adb*, chromedriverExecutable, keystore
fields, prebuilt WDA paths, ...) and adds the device's own. It blocks install_app, push_file,
pull_file and mobile: shell, mobile: installApp and similar host commands
(403 unsupported operation). Other mobile: commands work.
Authenticate like Selenium: basic auth with user hearth and the key as password, or
Authorization: Bearer $HEARTH_KEY (WebdriverIO headers). Examples:
https://test-zeus-ai.github.io/testzeus-hearth/guide/devices/#connect
driver.quit() ends it; the agent uploads video.mp4 and device.log and resets the device
(Android: clean snapshot; iOS: a fresh clone). For failures, use the hearth-debug-session skill.
Android emulator pods (nodes with /dev/kvm) are declared in the chart values; they run
privileged from the hearth-android:35 image (linux/amd64, API 35), so put them on dedicated
nodes:
devicePools:
- name: pixel8
platform: android
deviceName: Pixel 8
osVersion: "15"
cluster: { warm: 1, nodeSelector: { hearth.testzeus.com/kvm: "true" } }
Hosts can also be listed under agents: in the values, with a token from
hearth agent-token <host> and a hand-written agent.toml (the older way). They show in
hearth hosts as source config and are read-only there. See
https://test-zeus-ai.github.io/testzeus-hearth/guide/agents/
What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
appium, mobile-testing, device-farm, testzeus-hearth, emulators, simulators
npx claudepluginhub test-zeus-ai/testzeus-hearth --plugin hearth4 skills in this plugin
/hearth-connect-testsPoint an existing Playwright, Selenium or Appium test suite at a Hearth farm - environment variables, Playwright version matching, connect code for Node, Python, Java and .NET, and CI setup for GitHub Actions and GitLab CI. Use when the user wants their tests to run on Hearth, sees a version mismatch (`428 no_pool`), or wants Hearth in CI./hearth-debug-sessionInvestigate a failed or stuck Hearth session - find it, read the gateway's error, download its video and device log, take a live screenshot of a running session, stop it, and map the error to a fix. Use when a test failed on the Hearth farm, a connect or new-session request was refused (401, 404, 428, 429, 502), a session ended early, or the user asks what happened in a session./hearth-setupInstall the Hearth CLI and bring up a Hearth browser and device farm (local kind cluster, AWS or GCP, or an existing Kubernetes cluster with Helm), get an API key into the environment without exposing it, and verify the farm with `hearth status`. Use when the user wants to set up, install, start, upgrade or tear down Hearth, or when `hearth` is not installed yet.Other plugins' skills for the same job