Appium for Android - Test Environment Set Up Guide
—Chen Peng
part 1: software installation
- Download and Install VirtualBox
In order to use Genymotion android simulator, we need a virtualbox to support.
Url: https://www.virtualbox.org
2. Install Genymotion
Genymotion is a simulation for android device.
Download Url: https://www.genymotion.com
ps: before download you need register. Don’t worry, this is free.
we need add a device which we want( this will take a long time, and maybe failed interrupt serval times, you just need try again…)
3. install Android studio
URL:https://developer.android.com/studio/index.html
Run the studio after installation, it will download SDK automatically (this may take serval hours).
open the SDK manager and set SDK Location, and install Android 5.0 SDK.
4. install Appium
URL: http://appium.io
5. install Maven (optional)
* $ brew install maven
* $ mvn -v
6. others: also you need java environment, intelliJ (optional)
part 2: environment configuration
1. Genymotion setting, use Android SDK.
2. Install ARM_Translation_Lollipop_20160402.ZIP
you just need drag this zip package into simulator, this is used to translate code between ARM and X86.
3. set SDK environment variable
vim .bash_profile
export ANDROID_HOME=/Users/xxxx/Library/Android/sdk
export PATH=$ANDROID_HOME/platform-tools:$PATH
export PATH=$ANDROID_HOME/tools:$PATH
then:
source ~/.bash_profile
adb devices (run your Android simulator before this), we will use this data later.
4. Appium Configuration
in the Basic page, need to set “App Path”, “Platform Name”, “platform Version”, “Device Name”.
In Advanced page, need to set SDK path.
Part 3: Ready
when all the above steps is OK, we will check whether the environment is ready.
- Appium Launch
open your genymotion android simulator and then click the “launch” button.
if the environment is done, it will be like this(status 200)
2. run inspector
click this button, and you’ll see the following window, and congratulations, everything is OK!!