Prerequisites
- Autosana MCP server added to your coding agent
- One local target:
- iOS Simulator: macOS with the Simulator booted
- Android Emulator: macOS, Linux, or Windows with the emulator booted
- Physical Android device: a connected device with USB debugging allowed
- Physical iPhone: macOS with Xcode and a trusted, unlocked iPhone in Developer Mode — connected over USB or Wi-Fi (see Wireless (Wi-Fi) iPhone for the one-time wireless setup)
- Web: a local dev server running on any OS (e.g.
localhost:3000). HTTP and HTTPS dev servers are both supported — the scheme is auto-detected. Frameworks likenext dev --experimental-https,vite --https, and mkcert-based setups work out of the box.
Usage
Tell your coding agent (Cursor, Claude Code, etc.):Physical Device Local Testing
Use this when you need Autosana to control a real phone connected to your computer. Android devices use the same local testing path as Android Emulators. Physical iPhones need the stricter iPhone readiness checks below. Tell your coding agent:- Keep it awake, unlocked, and on the app being tested (Android over USB stays plugged in; a Wi-Fi iPhone stays on the same network as your Mac)
- For Android, allow USB debugging when prompted
- For iPhone, keep Developer Mode enabled and leave the Mac trusted
- For iPhone, use a longer Auto-Lock interval, or temporarily set Auto-Lock to Never while testing
- Do not lock an iPhone from iPhone Mirroring during a run
Wireless (Wi-Fi) iPhone
A physical iPhone connected only over Wi-Fi works the same way — your agent auto-detects the wireless connection and handles WebDriverAgent setup for you. There’s a one-time setup, done in Apple’s tools:- Plug the iPhone into your Mac once over USB and pair/trust it.
- In Xcode → Window → Devices and Simulators, enable “Connect via network” for the device. After that you can unplug the cable.
- Trust the developer certificate on the device when prompted: Settings → General → VPN & Device Management → tap your “Apple Development” entry → Trust.
- Make sure Developer Mode is on (Settings → Privacy & Security → Developer Mode).
- Keep the iPhone on the same Wi-Fi network as your Mac, unlocked, with the screen on. Setting Auto-Lock to Never matters more here: the first WebDriverAgent build can take ~30-60 seconds, and a screen that locks mid-setup will interrupt it (your agent will tell you to unlock and retry).
- The first session builds and installs WebDriverAgent (slower); later sessions reuse the cached build and start quickly.
- Wireless is slower than USB and a bit more sensitive to network hiccups; for long unattended runs a cable is still the most reliable.
Multi-Device Parallel Testing
Run the same flow across multiple devices at the same time — different screen sizes, OS versions, or just faster coverage.How it works
- Boot your devices — open multiple iOS Simulators, Android Emulators, or both
- Tell your agent what to test:
- The Autosana CLI auto-detects all booted devices, starts a separate session for each (with its own tunnel and Appium server), and runs your flows simultaneously across all of them
- Results come back per-device — you see pass/fail for each device independently, with links to the run details on the dashboard
What gets auto-detected
- iOS: All booted Simulators (via
xcrun simctl) - Android: All connected emulators and devices (via
adb)
Example use cases
- Screen size coverage: Run the same flow on iPhone SE, iPhone 16 Pro, and iPad to verify layouts across screen sizes
- OS version testing: Boot simulators on iOS 17 and iOS 18 to catch version-specific bugs
- Cross-platform: Test on both an iOS Simulator and Android Emulator in a single run