When Appium V1.2 was released, two modes for android automation were introduced, Appium Mode and Selendroid Mode.

From a technical point of view, Appium mode is based on Google’sUIAutomator, and Selendroid mode is based on Google’s Instrumentation. Android Versions 2.3 through 4.2 are supported via Appium’s bundled version of Selendroid, which utilizes Instrumentation. Versions 4.2 and up are supported via Appium’s own UIAutomator libraries. This is the default automation backend.

Both UIAutomator and Instrumentation are Android frameworks provided by Google. UIAutomator is much newer, which was released after Android API level 16 (Android 4.1.2), as the automation test framework for people to test the user interface (UI). This also means that if you select Appium mode, the android version of your device must be at least 4.2.2 (API level 17). At the same time, the Selendroid mode supports the lower version, from API 10 to API 16. In one word, if you want to automate an android application on Android 4.2.2 or higher versions, please select Appium mode. Otherwise, select Selendroid mode.

So what types of apps are supported for mobile test automation by these two modes? Mobile applications, normally can be separated into 3 types:

1. Native application

2. Hybrid application

3. Web application

From the Appium site, “Native apps are those written using the iOS or Android SDKs. Mobile web apps are web apps accessed using a mobile browser (Appium supports Safari on iOS and Chrome or the built-in ‘Browser’ app on Android). Hybrid apps have a wrapper around a “webview” — a native control that enables interaction with web content.”

In fact both UIAutomator and Instrumentation naturally support all the three app types. But for Appium, the Selendroid mode does NOT support the web app, which means you cannot use Appium to automate Web App testing for the devices with API Level 10 to 16. Keep this in mind while selecting candidates for automation tools.

AppiumMode_SelendroidMode

So you may ask, “what if I want to automate testing for my web application on Android 3.0?” The answer is: you have to select another tool, for example Selendroid (http://selendroid.io/).

Download Getting Started with Android Automation Using Robotium