What is Appium? Mobile App Test Automation
Appium is an open-source framework that automates iOS, Android and desktop apps through the WebDriver protocol. How it works, drivers, mistakes and FAQ.
What is Appium?
Appium is an open-source framework for automating the user interface of mobile apps on iOS and Android, plus desktop apps and browsers. It runs as an HTTP server that implements the WebDriver protocol, so test code written in any language with an Appium client can drive the app you actually ship, without adding a test SDK to it.
How Appium works
Appium has four parts: a core that defines the API, drivers that connect to a specific platform, clients that expose the API in a programming language, and optional plugins that extend the core. Your test uses a client to send WebDriver commands to the server, and the server hands them to the right driver.
- UiAutomator2 and Espresso for Android apps.
- XCUITest for iOS, iPadOS, tvOS and watchOS apps.
- Mac2 and Windows for desktop apps, Safari, Gecko and Chromium for browsers.
Official clients exist for JavaScript, Java, Python, Ruby and .NET. Flutter apps have community-supported drivers, see Flutter. Appium 3 requires Node.js 20.19 or newer and removes many deprecated endpoints, for example the old desiredCapabilities parameter: only capabilities is accepted.
Example: a login test
You start a session by sending capabilities that name the platform, the driver (for example UiAutomator2) and the app file. The test then finds the email field by its accessibility id, types a value, taps the login button and asserts that the home screen element appears. The same flow on iOS only changes the capabilities and, where needed, a few locators. This is typical regression testing of a critical user journey.
Common mistakes with Appium
- Using long XPath locators. They are slow and break on small layout changes. Prefer accessibility ids that developers set on purpose.
- Fixed sleeps instead of explicit waits for an element to be visible or clickable.
- Automating everything through the UI. Keep a small set of end-to-end flows and test the rest at unit and API level.
- Upgrading Appium without updating drivers. Appium 3 asks you to run recent driver versions.
- Forgetting to quit the session, which leaves devices and emulators busy.
Appium, mobile frameworks and performance testing
Appium works with native apps and with apps built in cross-platform frameworks such as React Native. For web content in a mobile browser, see how to test sites in mobile emulators and browser device mode. For browser tests in JavaScript, WebdriverIO is a related option.
Appium checks that the interface behaves correctly on a device. It does not tell you how the backend copes with many users at once. For that, run a load test against the APIs the app calls. LoadFocus can run existing JMeter scripts in the cloud, see JMeter load testing and load testing. LoadFocus does not integrate with Appium.
FAQ
Is Appium free?
Yes. Appium is open source. You pay only for the devices, emulators or cloud device services you choose to run it on.
Does Appium need changes to my app?
No. Appium automates the unmodified app through the automation tools of each platform, so you test the same build you ship.
Which languages can I write Appium tests in?
Any language that has an Appium or WebDriver client. Official clients exist for JavaScript, Java, Python, Ruby and .NET.
What is the difference between Appium 2 and Appium 3?
Appium 2 moved platform support into separately installed drivers. Appium 3 raises the minimum Node.js version to 20.19 and removes many deprecated endpoints and legacy parameters.
Can I use Appium for load testing?
No. Appium drives one device at a time through the interface. To test how a backend handles many users, use a load testing tool against its APIs.
Related terms
Related LoadFocus Tools
Put this concept into practice with LoadFocus, the same platform that powers everything you just read about.