Skip to content

Device Setup

Spana auto-discovers available devices for each platform. This guide covers how to set up and verify your devices before running tests.

Terminal window
spana devices

This lists all discovered devices across your configured platforms:

Platform ID Name Type
web playwright-chromium Chromium (Playwright) browser
android emulator-5554 emulator-5554 emulator
ios 7338EC82-D2BD-4722-B148-D009FDA64F6E iPhone 16 (iOS 18.4) simulator

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.

Spana discovers Android devices through adb (Android Debug Bridge).

  • Android SDK — install via Android Studio or the command-line tools
  • ADB — included in the Android SDK platform tools
  • Java 17+ — required by UiAutomator2
Terminal window
# List available AVDs
emulator -list-avds
# Start an emulator
emulator -avd Pixel_7_API_34 &
# Verify it appears
adb devices
# emulator-5554 device
  1. Enable Developer Options on the device
  2. Enable USB Debugging in Developer Options
  3. Connect via USB and accept the debugging prompt
  4. Verify: adb devices should show your device serial

When multiple Android devices are connected:

Terminal window
# Use the --device flag with the serial from `spana devices`
spana test --platform android --device emulator-5554

Spana discovers booted iOS simulators through Xcode’s simctl.

  • Xcode — install from the Mac App Store
  • Xcode Command Line Toolsxcode-select --install
  • A booted simulator — spana only discovers simulators that are already running
Terminal window
# List all available simulators
xcrun simctl list devices available
# Boot a simulator
xcrun simctl boot "iPhone 16"
# Or open the Simulator app
open -a Simulator
Terminal window
# Use the UDID from `spana devices`
spana test --platform ios --device 7338EC82-D2BD-4722-B148-D009FDA64F6E

Physical iOS device testing requires additional signing configuration in your config:

spana.config.ts
export default defineConfig({
apps: {
ios: {
bundleId: "com.example.myapp",
signing: {
teamId: "YOUR_TEAM_ID",
signingId: "Apple Development",
provisioningProfile: "path/to/profile.mobileprovision",
},
},
},
});

Run the same flows on multiple devices simultaneously:

Terminal window
# Run on a specific Android and iOS device
spana test \
--platform android,ios \
--device emulator-5554 \
--device 7338EC82-D2BD-4722-B148-D009FDA64F6E

When no --device flag is provided, spana uses the first available device for each platform.

  • Check adb devices shows your device with state device (not offline or unauthorized)
  • Restart ADB: adb kill-server && adb start-server
  • For emulators, ensure the emulator is fully booted (wait for the home screen)
  • 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"
  • Open WebDriverAgent.xcodeproj in Xcode and resolve signing issues
  • Ensure your Xcode version matches the simulator runtime
  • Try: xcodebuild -showsdks to verify available SDKs