Mobile Testing Overview
Android vs iOS Testing Considerations
Android vs iOS Testing Considerations
Mobile testing is not just "Selenium for phones." Each platform has distinct testing challenges.
Android Testing Landscape
Test framework: UIAutomator2 (recommended), Espresso (unit/integration level)
Environment options:
- Android Emulator (free, included with Android Studio)
- Real devices (required for camera, GPS, biometric tests)
- Cloud device farms (BrowserStack, Sauce Labs, AWS Device Farm)
Key Android-specific test challenges:
- Back button behaviour (Android hardware back vs iOS swipe-back)
- Intent handling (deep links, share sheets, notifications)
- Permission dialogs vary by Android version (10, 11, 12, 13, 14 each changed the permission model)
- Fragmentation: 10,000+ device models with different screen sizes, manufacturers, and OS customisations
iOS Testing Landscape
Test framework: XCUITest (Apple's native framework, used by Appium's XCUITest driver)
Environment options:
- iOS Simulator (Mac-only, fast for development)
- Real devices (required for push notifications, Face ID, NFC, GPS)
Key iOS-specific test challenges:
- Simulator requires macOS host machine — CI on Linux cannot run iOS tests
- App signing: real device tests require developer certificates
- Privacy permissions: iOS permission dialogs must be accepted/denied explicitly
- Strict UI hierarchy: iOS accessibility IDs are more reliable than Android resource IDs on some apps
Cross-Platform Differences in Test Design
| Concern | Android | iOS |
|---|---|---|
| Back navigation | Hardware back button | Swipe from left, nav bar button |
| Permissions | System dialog (varies by version) | System dialog (consistent) |
| Text input | Keyboard auto-correct varies | Keyboard auto-correct varies |
| Locator type | resource-id, content-desc, text | accessibility id, label, name |
| Network simulation | Android emulator network controls | Simulator link conditioner |
Deciding What to Test on Each Platform
If you have 80/20 Android/iOS users: run full test suite on Android, smoke + critical path on iOS. Cross-platform React Native or Flutter apps share logic — focus platform-specific tests on UI behaviour, gestures, and permission flows.
Your iOS tests must run on real devices for push notification testing. What constraint does this impose on CI?
Next Lesson
Appium 2 Architecture & Drivers