Mobile, performance and coding · mid
Mobile testing with Appium and devices
Appium drives apps through the platform own automation tools. Real phones behave differently from emulators.
Explain it out loud
Explain it out loud to an AI interviewer that follows up, and see where your answer is thin.
Practise by voiceThe notes
What you must know
- The client library sends W3C WebDriver commands over HTTP to the Appium server, which passes them to a driver. The driver talks to the platform: UiAutomator2 or Espresso on Android, XCUITest through WebDriverAgent on iOS.
- Since Appium 2, drivers and plugins are installed separately (appium driver install uiautomator2). Appium-specific capabilities use the appium: prefix. Appium 3 is W3C only.
- Emulator passes and real phone fails because of manufacturer skins with extra permission and battery dialogs, Android versions, screen sizes, slower CPUs, keyboards, language and font size.
- Evidence: farm video, screenshots, logcat, Appium server logs, failures grouped by model and Android version.
- Handle permission pop-ups up front (appium:autoGrantPermissions), handle known manufacturer dialogs in one helper, and hide the keyboard or scroll the button into view.
- Use explicit waits on specific conditions. Huge implicit waits slow every test.
- Emulators and simulators are free, fast and easy to reset, but are not real hardware. Own devices give full control but need upkeep. Cloud farms give many real devices but cost per parallel device and have queues.
- A good split: emulators on pull requests, a small set of popular real devices (chosen from analytics) nightly. iOS needs Macs.
The red pen
Common traps: mistake → fix
Mistake: Appium is Selenium for mobile
Fix: it has its own server and drivers.
Mistake: Test only on Pixels and flagships
Fix: your users use many brands and Android versions.
Mistake: Use XPath for everything
Fix: prefer accessibility ids and stable ids.
Mistake: Test on every device
Fix: choose by usage data.
Easy to hard
Questions interviewers ask, easy to hard
- How does Appium work? What are drivers?
- A test passes on the emulator and fails on real phones. Why?
- Emulator, own devices or a cloud farm: how do you choose?
Practise
Practise with these questions
Explain it out loud
Explain it out loud to an AI interviewer that follows up, and see where your answer is thin.
Practise by voiceYour first interview is free
Sign up and start with a 15-minute interview with the full report, and an English conversation. No card needed.