Appium: Android 环境搭建

整理资料看到以前写的一篇appium环境搭建指南,偷懒就直接放上来了。如有不工作了的步骤,请指出。

 

part 1: Preparing 

1. 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 or gradle (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  for translating 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: Check

when all the above steps is OK, we will check whether the environment is ready.

1.  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!!

发表评论

电子邮件地址不会被公开。 必填项已用*标注