Q2 of 26 · Mobile QA

How do you configure Appium to start an automated session on an Android device?

Mobile QAJuniormobileappiumandroidsetupcapabilities

Short answer

Short answer: Install the Appium server and the UIAutomator2 driver, configure capabilities specifying the app path, platform, device name, and automation name, then create a driver session from your client library pointing at the Appium server URL.

Detail

Appium 2 separates the server from its drivers — you install both independently. For Android you need: npm install -g appium, then appium driver install uiautomator2. Ensure the Android SDK is installed and ANDROID_HOME is set.

Capabilities tell Appium what to start. The minimum set for an Android app:

{
  "platformName": "Android",
  "appium:automationName": "UIAutomator2",
  "appium:deviceName": "emulator-5554",
  "appium:app": "/path/to/MyApp.apk",
  "appium:noReset": false
}

Your client library (WebdriverIO, Java Selenium, Python, etc.) creates a RemoteWebDriver or AppiumDriver pointing at http://localhost:4723. Appium installs the app, launches it, and returns a session ID. From there, commands follow the W3C WebDriver protocol.

One thing interviewers often probe: noReset: false (the default) uninstalls and reinstalls the app before each session, giving a clean state. fullReset also clears app data. noReset: true reuses existing app state — faster but risks test pollution.

// EXAMPLE

android.capabilities.ts

import { remote } from 'webdriverio';

const driver = await remote({
  hostname: 'localhost',
  port: 4723,
  capabilities: {
    platformName: 'Android',
    'appium:automationName': 'UIAutomator2',
    'appium:deviceName': 'emulator-5554',
    'appium:app': './app/debug/MyApp.apk',
    'appium:noReset': false,
  },
});

// WHAT INTERVIEWERS LOOK FOR

Understands the server/driver/client separation in Appium 2, can name the UIAutomator2 driver, and knows what the core capabilities do.