Mobile testing fundamentals
Mobile bugs don't look like web bugs. Device fragmentation, OS quirks, network instability, and app lifecycle states create failure modes you won't find in a browser. Build the mental model first.
Native vs hybrid vs web apps
Three architectures, three different test surfaces. Knowing which one you're testing changes everything — from locator strategies to performance baselines.
You'll learn to
- Identify whether an app is native, hybrid, or web-based
- Pick the right automation framework for each architecture
- Recognise common cross-architecture bugs (WebView leaks, bridge timeouts)
Emulators, simulators, and real devices
Each test environment lies to you in a different way. Knowing when each one is enough — and when only a real device will catch a bug — is core mobile testing judgement.
You'll learn to
- Distinguish iOS simulators from Android emulators (they are not the same thing)
- Set up and configure an Android emulator via AVD Manager
- Boot iOS simulators via Xcode
- Know which bugs only reproduce on real devices (sensors, battery, network transitions)
Cross-platform automation with Appium
Most teams start mobile automation with Appium because one test script can drive both iOS and Android. Learn the architecture, the locator strategies, and the gesture model that make Appium tests reliable.
Appium architecture and setup
Appium is a server that translates WebDriver commands into platform-specific automation. Understanding the architecture explains why setup is finicky and what to do when sessions hang.
You'll learn to
- Install Appium server and drivers (XCUITest driver for iOS, UiAutomator2 driver for Android)
- Configure desired capabilities for both platforms
- Connect Appium Inspector to inspect element trees
- Debug 'session not created' errors (most are capability mismatches)
Locator strategies on mobile
Mobile UI hierarchies are not HTML. You can't use CSS selectors. Accessibility IDs, predicate strings, and platform-specific XPath each have a place — and getting locators right is half the battle.
You'll learn to
- Use accessibility IDs (most stable, works cross-platform)
- Write iOS predicate strings and class chains
- Write Android UiAutomator selectors
- Avoid XPath where possible (slow and brittle on mobile)
Gestures, waits, and synchronisation
Tap, swipe, pinch, long-press, scroll — mobile interactions are physical. They take time, and time is where flake lives. Learn the gesture API and the waiting strategies that beat sleep().
You'll learn to
- Use TouchAction / W3C Actions for taps, swipes, and multi-finger gestures
- Implement explicit waits for element conditions
- Handle keyboard show/hide states
- Debounce navigation transitions to avoid race conditions
Platform-specific deep dive
Cross-platform tests catch roughly 80% of issues. For the other 20% — platform-specific bugs, performance regressions, deep system integrations — you need native test runners. They run faster, see more, and ship inside the app bundle.
XCUITest for iOS
Apple's own UI testing framework. Runs in Xcode, ships with the app, uses Swift. If your team is iOS-first, XCUITest will outpace Appium on speed and stability.
You'll learn to
- Set up an XCUITest target in Xcode
- Write basic UI tests in Swift
- Use the XCUIElement query API
- Handle system alerts (permissions, notifications)
Espresso for Android
Google's native UI testing framework. Synchronises automatically with the main thread. Espresso tests are faster than Appium because they run in-process — no server round-trip per command.
You'll learn to
- Configure Espresso in an Android Gradle project
- Use ViewMatchers, ViewActions, and ViewAssertions
- Wait for async completion with IdlingResource
- Run Espresso tests from Android Studio and from CLI
Lightweight alternatives: Maestro and Detox
When Appium feels heavy and native frameworks feel siloed, two tools have emerged in the middle: Maestro (YAML-based flows, very approachable) and Detox (React Native specialist with grey-box testing).
You'll learn to
- Write a Maestro flow YAML file
- Run Detox tests against React Native apps
- Choose between Appium, native frameworks, Maestro, and Detox based on team context
Real devices, CI, and scale
A mobile test that runs on your laptop is a demo. A mobile test that runs reliably across 20 device-OS combinations on every commit is a product. Get there with device farms, parallelisation, and CI integration.
Device farms — BrowserStack, Sauce Labs, AWS Device Farm
You can't own every iPhone and Android. Cloud device farms let you run the same test suite against hundreds of real device/OS combinations on demand.
You'll learn to
- Authenticate Appium to BrowserStack or Sauce Labs
- Pick a representative device matrix (don't test every device — test the right slice)
- Use parallel runs to keep suite time manageable
- Pull video and device logs from failed runs
Mobile tests in CI/CD
Mobile pipelines are uniquely painful — code signing, provisioning profiles, certificate rotation, IPA/APK builds, simulator boots. Build the pipeline once, document the certificate process, sleep at night.
You'll learn to
- Trigger mobile builds on PR in GitHub Actions or GitLab CI
- Manage iOS code signing in CI without leaking certificates
- Run a smoke suite on every PR, full suite nightly
- Cache pods, Gradle dependencies, and emulator snapshots
Production-grade mobile testing
Functional tests catch functional bugs. The remaining 30% of user-visible issues — slow launches, accessibility violations, crashes on specific devices — need a different toolkit. This is where mobile QA becomes mobile-quality engineering.
Mobile performance — cold start, battery, network
A 4-second cold start drives away the majority of users before they reach your first screen. Performance is a feature on mobile. Learn to measure cold/warm start, frame drops, battery draw, and network usage under throttled conditions.
You'll learn to
- Measure cold and warm start times
- Profile with Xcode Instruments and Android Studio Profiler
- Throttle the network to simulate 3G and poor connectivity
- Identify ANRs (Android) and main-thread hangs (iOS)
Mobile accessibility and crash monitoring
Mobile accessibility is non-negotiable in many markets (legal compliance in EU/US public sectors). Add accessibility scans to your test suite, and pair them with crash reporting to close the loop on what users actually experience.
You'll learn to
- Run Accessibility Scanner (Android) and Accessibility Inspector (iOS)
- Test with VoiceOver and TalkBack screen readers
- Integrate Firebase Crashlytics or Sentry for crash reports
- Triage crashes by device/OS version, not just frequency