← All glossary terms

Android testing

Android testing covers the parts of mobile testing specific to Android: its native test frameworks, its runtime permission model, and the wide range of devices and OS versions that different manufacturers ship. It's narrower than mobile testing in general, since iOS has its own tools and platform quirks that don't carry over.

Mobile test automation often covers iOS and Android together through a cross-platform tool. Android testing is about the parts that don't carry over. Android has its own native frameworks: Espresso for UI tests inside an app, and UI Automator for interactions that cross into other apps or the system UI. It asks for permissions at runtime rather than at install. And it runs on hardware from dozens of manufacturers, unlike iOS.

That last point, fragmentation, is the defining challenge. At any given time there's a fairly small set of iOS devices, all running an OS Apple controls. Android spans phones from many manufacturers, some running customized versions of the OS, released years apart, with updates rolling out unevenly. So a feature that works on one manufacturer's phone can behave differently on another's, even on the same Android version.

A few platform behaviors need their own coverage. A feature that uses location, the camera, or storage has to handle the user granting, denying, or later revoking that permission. The back button and the activity lifecycle (an app being paused, stopped, or killed by the system to free memory) have no close iOS equivalent. And many apps ship several build variants from one codebase, such as a free and a paid version, and each one needs testing.


What's specific to Android

  • Native frameworks: Espresso for UI tests inside the app, UI Automator for cross-app and system UI interactions.
  • Runtime permissions that a test has to cover being granted, denied, or revoked.
  • Device and manufacturer fragmentation, with many companies shipping customized versions of the same OS.
  • The back button and activity lifecycle: how an app handles being paused, stopped, or killed by the system.
  • Build variants, since many apps ship several configurations from one codebase.

Where it shows up

  • Testing a location or camera feature with the permission granted, denied, and revoked.
  • Checking that an app restores its state after the system kills it to free memory and the user reopens it.
  • Confirming a screen renders correctly on a manufacturer's customized Android, not just the stock OS.
  • Testing both a free and a paid build variant to confirm each behaves as intended.

Benefits and challenges

BenefitChallenge
Native frameworks like Espresso integrate tightly with Android's tooling and run UI tests quickly and reliably. Device and manufacturer fragmentation is much harder to cover than iOS's narrower hardware range.
Testing runtime permissions catches a real class of bug: an app that breaks when a permission is denied. The back button and activity lifecycle add complexity that web testing never has to consider.
Covering every build variant catches problems that only exist in one configuration before users hit them. With so many OS versions and manufacturer customizations in use, full coverage turns into a prioritization problem.

Frequently asked questions

How is Android testing different from iOS testing?

Each platform has its own native frameworks, permission model, and behaviors. Android deals with far more device and OS fragmentation across manufacturers, while iOS testing works with a narrower, more controlled hardware range and its own tooling.

What's the difference between Espresso and UI Automator?

Espresso tests inside a single app and synchronizes closely with the app's UI thread, which makes it fast. UI Automator can reach across apps and into system UI, like a notification or a permission dialog, which Espresso can't. Many Android suites use both.

How should a team prioritize Android device coverage?

Most teams start from real usage data: which devices and OS versions their users are on. Emulators give broad baseline coverage, and real devices, often through a cloud device farm, cover the combinations that matter most.


How Klarent helps

Klarent runs Android tests against an uploaded .apk on cloud-hosted real devices and emulators, and can cover permission prompts, network changes like airplane mode, and device time changes from a plain-English description of the flow.


Ready to eliminate QA bottlenecks? Talk to our team for a personalised walkthrough.

Book a free 30 minute call