Choosing a Framework: Appium, Espresso, XCUITest, Maestro
On this page
There is no best mobile test framework, only one that fits who writes the tests, which platforms you ship and what the tests need to see. This chapter compares the four frameworks most teams choose between. All four run on TestingBot, and nothing stops you from using two of them for different jobs.
Two families: inside the app and outside it#
Native frameworks ship with the platform. Espresso (Android) and XCUITest (iOS) are built by Google and Apple, run as part of the platform's own test runner, and are written in the app's language: Kotlin or Java for Espresso, Swift or Objective-C for XCUITest. Espresso runs in the same process as your app, so it knows when the main thread is idle and synchronises automatically; XCUITest runs in a separate runner process and talks to the app through the accessibility layer.
Black-box frameworks drive the app from the outside, the way a user would. Appium speaks the W3C WebDriver protocol and delegates to platform drivers (UiAutomator2 for Android, XCUITest for iOS). Maestro reads the screen through the accessibility layer and plays steps from a YAML file. Neither needs your source code, only the built app.
Side by side#
| Appium | Espresso | XCUITest | Maestro | |
|---|---|---|---|---|
| Platforms | Android and iOS | Android | iOS | Android and iOS |
| Test language | Any WebDriver client: Java, JavaScript, Python, C#, Ruby... | Kotlin, Java | Swift, Objective-C | YAML, plus JavaScript for logic |
| Needs app source | No | Yes, tests are built with the app | Yes, tests are built with the app | No |
| Synchronisation | Explicit waits you write | Automatic for the main thread and registered idling resources | Waits for the app to be idle, plus explicit expectations | Built-in waiting and retrying assertions |
| Speed | Slowest: every command is an HTTP round trip | Fast | Fast | Between the two |
| Can leave the app (settings, other apps) | Yes | Very limited | Yes, through other app instances | Yes |
| Typical owner | QA automation engineers | Android developers | iOS developers | QA and developers together |
When each one fits#
Choose Espresso or XCUITest when the app's developers will write and maintain UI tests next to the code. They are fast, stable and get new platform features first. The trade-off is two codebases for two platforms and a rebuild of the test APK or test bundle for every change.
Choose Appium when one team covers both platforms in a language it already uses, when you already have WebDriver tooling (reporters, page objects, a grid) from web testing, or when tests have to reach outside the app. The cost is speed and more explicit waiting. The Appium with WebdriverIO course covers this path in depth.
Choose Maestro for end-to-end user journeys that QA engineers and developers can both read, with fast iteration (edit YAML, re-run, no build). The trade-off is a smaller programming surface: a JavaScript sandbox rather than a full language and package ecosystem, and no WebDriver compatibility. The Maestro course covers it from first flow to CI.
Plenty of teams combine them: developers keep Espresso and XCUITest suites for screens they own, and a smaller Appium or Maestro suite covers cross-platform journeys like sign-up and checkout. The comparisons Appium vs Espresso and Appium vs XCUITest go deeper on those pairs.
A QA team of three, comfortable with Python and Selenium, must cover the Android and iOS apps of a product whose source they cannot change. Which choice fits best?
Appium needs only the built apps, covers both platforms and uses the WebDriver skills the team already has. Espresso and XCUITest need the app's source and two native languages; XCUITest cannot test Android at all.
Questions that decide it#
When the table does not settle it, these questions usually do:
- Who will fix a red test at 9 a.m.? If it is the app developers, use their tools. If it is a QA team, use a framework in their language.
- Do you ship both platforms from one codebase (React Native, Flutter, Kotlin Multiplatform)? A cross-platform framework lets one test describe both, provided the element identifiers match.
- What has to be visible to the test? Internal state, mocked network layers and idling resources favour native frameworks. System dialogs, deep links from other apps and settings favour Appium or Maestro.
- How fast must feedback be? A suite on every pull request needs to finish in minutes. Native frameworks and sharded runs help; long Appium suites need more parallel devices.
Identifiers make or break any choice#
Every framework above locates elements best through identifiers that do not change with copy or layout: Android resource ids and content descriptions, iOS accessibility identifiers. The calculator sample app in this course exposes inputA, inputB and sum, which is why the same check works in Appium, Maestro and on both platforms. If your app has none, adding them is the single cheapest improvement to test stability, and it helps screen reader users too.
Your Maestro flows locate the "Pay" button by its text. After the app is translated into French, every checkout flow fails. What is the lasting fix?
Text changes with every locale and every copy edit, whatever the framework. An identifier is invisible to users and stays the same in every language, so one flow keeps working.