Midscene E2E Tests
Midscene can test apps on your real iPhone through the board. The @midscene/ios-esp32 adapter exposes the board over Midscene Connect, so Midscene’s vision agent runs aiAct, aiAssert and aiQuery tests and writes step-by-step replay reports.
The board captures the screen over AirPlay and taps, swipes and types as a Bluetooth or USB keyboard and mouse. The iPhone stays stock: no Developer Mode, no Xcode signing, no expiring certificates and no WebDriverAgent.
This integration was built by @await-ovo as part of Midscene Test Everything (showcase issue). Thank you!
Quick start
Section titled “Quick start”-
Set up the board and pair your computer with the CLI guide, then check that you get a screenshot (Node.js 20.19+ and
ffmpeg):Terminal window npx -y esp32agent devicesnpx -y esp32agent screenshot -
Start the Midscene Connect service. It connects to the paired board automatically (pass
--device <id>or setESP32AGENT_DEVICEwhen you have several):Terminal window npx @midscene/ios-esp32It listens on
http://127.0.0.1:5820; no token is needed on localhost. -
Try it interactively in Midscene Playground:
Terminal window npx @midscene/connect playground --url http://127.0.0.1:5820 -
Write a test with the Midscene SDK:
import { agentOverConnectProtocol } from '@midscene/connect';const agent = await agentOverConnectProtocol({ url: 'http://127.0.0.1:5820' });try {await agent.aiAct('Open Settings and tap General');await agent.aiAssert('The General settings page is visible');} finally {await agent.destroy();}
Midscene uses its own model configuration for planning and locating; see the Midscene model docs.
- Text input: tap a field first; the adapter types printable ASCII. For other text, tap the on-screen keyboard.
- Stale frames: if Screen Mirroring drops, the adapter retries for 10 seconds by default (
--stale-retry-mschanges it). Check that Control Center → Screen Mirroring → ESP32 Agent is on. - More detail and troubleshooting: the
@midscene/ios-esp32README.
Manina AI is not affiliated with ByteDance or the Midscene project.
