Device Setup
Spana auto-discovers available devices for each platform. This guide covers how to set up and verify your devices before running tests.
Checking available devices
Section titled “Checking available devices”spana devicesThis lists all discovered devices across your configured platforms:
Platform ID Name Typeweb playwright-chromium Chromium (Playwright) browserandroid emulator-5554 emulator-5554 emulatorios 7338EC82-D2BD-4722-B148-D009FDA64F6E iPhone 16 (iOS 18.4) simulatorWeb (Playwright)
Section titled “Web (Playwright)”Web testing works out of the box — Playwright manages its own Chromium browser. No setup required.
Spana always shows playwright-chromium as an available web device.
Android
Section titled “Android”Spana discovers Android devices through adb (Android Debug Bridge).
Prerequisites
Section titled “Prerequisites”- Android SDK — install via Android Studio or the command-line tools
- ADB — included in the Android SDK platform tools
- Java 17+ — required by UiAutomator2
Using an emulator
Section titled “Using an emulator”# List available AVDsemulator -list-avds
# Start an emulatoremulator -avd Pixel_7_API_34 &
# Verify it appearsadb devices# emulator-5554 deviceUsing a physical device
Section titled “Using a physical device”- Enable Developer Options on the device
- Enable USB Debugging in Developer Options
- Connect via USB and accept the debugging prompt
- Verify:
adb devicesshould show your device serial
Targeting a specific device
Section titled “Targeting a specific device”When multiple Android devices are connected:
# Use the --device flag with the serial from `spana devices`spana test --platform android --device emulator-5554Spana discovers booted iOS simulators through Xcode’s simctl.
Prerequisites
Section titled “Prerequisites”- Xcode — install from the Mac App Store
- Xcode Command Line Tools —
xcode-select --install - A booted simulator — spana only discovers simulators that are already running
Booting a simulator
Section titled “Booting a simulator”# List all available simulatorsxcrun simctl list devices available
# Boot a simulatorxcrun simctl boot "iPhone 16"
# Or open the Simulator appopen -a SimulatorTargeting a specific simulator
Section titled “Targeting a specific simulator”# Use the UDID from `spana devices`spana test --platform ios --device 7338EC82-D2BD-4722-B148-D009FDA64F6EPhysical iOS devices
Section titled “Physical iOS devices”Physical iOS device testing requires additional signing configuration in your config:
export default defineConfig({ apps: { ios: { bundleId: "com.example.myapp", signing: { teamId: "YOUR_TEAM_ID", signingId: "Apple Development", provisioningProfile: "path/to/profile.mobileprovision", }, }, },});Multi-device testing
Section titled “Multi-device testing”Run the same flows on multiple devices simultaneously:
# Run on a specific Android and iOS devicespana test \ --platform android,ios \ --device emulator-5554 \ --device 7338EC82-D2BD-4722-B148-D009FDA64F6EWhen no --device flag is provided, spana uses the first available device for each platform.
Troubleshooting
Section titled “Troubleshooting”Android: “no devices found”
Section titled “Android: “no devices found””- Check
adb devicesshows your device with statedevice(notofflineorunauthorized) - Restart ADB:
adb kill-server && adb start-server - For emulators, ensure the emulator is fully booted (wait for the home screen)
iOS: “no simulators found”
Section titled “iOS: “no simulators found””- Spana only discovers booted simulators — make sure one is running
- Check:
xcrun simctl list devices booted - If empty, boot one:
xcrun simctl boot "iPhone 16"
iOS: WebDriverAgent build fails
Section titled “iOS: WebDriverAgent build fails”- Open
WebDriverAgent.xcodeprojin Xcode and resolve signing issues - Ensure your Xcode version matches the simulator runtime
- Try:
xcodebuild -showsdksto verify available SDKs