Skip to content

Latest commit

 

History

History
51 lines (36 loc) · 2.46 KB

android-setup.md

File metadata and controls

51 lines (36 loc) · 2.46 KB

Android Setup

To get started, you'll need to install node.js (v0.10 or greater). Just follow the instructions for your flavor of linux.

Once you've got node.js installed, install the Android SDK. You will need to run the 'android' tool (included in the SDK, under the 'tools' directory).

Run the 'android' tool and use it to install an API Level 17 or greater.

(If you want to run Appium from source, you will also need Apache Ant to build the bootstrap jar that Appium uses for running against Android simulators/devices.)

Finally, set $ANDROID_HOME to be your Android SDK path. If you unzipped the Android SDK to /usr/local/adt/, for example, you should add this to your shell startup:

export ANDROID_HOME="/usr/local/adt/sdk"

Now you're set up to run Appium! If you're running Appium from source, run ./reset.sh --android from your Appium checkout to install all the dependencies.

Additional Setup for Older Versions of Android

Appium uses, and comes prepackaged with, Selendroid for running Android versions 2.3 to 4.1. Appium switches to using Selendroid automatically when it detects older versions, but there is some additional setup required if you're running from source.

  • Make sure you have Maven 3.1.1 or newer installed (mvn).
  • Run ./reset.sh --selendroid from your Appium checkout

Running Appium Android Tests

To run tests on Linux, you will need to have the Android Emulator booted and running an AVD with API Level 17 or greater. Then run Appium (appium) after installing via NPM, or node . in the source directory if running from source.

See the server documentation for all the command line arguments.

Notes

  • There exists a hardware accelerated emulator for android, it has its own limitations. For more information you can check out this page.
  • Make sure that hw.battery=yes in your AVD's config.ini, if you want to run any of the Appium tests, or use any of the power commands.
  • Selendroid requires the following permission for your app:
    <uses-permission android:name="android.**permission.INTERNET"/>, please make sure your app has internet permission set when you are using selendroid or older versions of Android i.e. 2.3 to 4.1