1. EnvironmentSetup:
Downloadandroidsdkof APIlevel 17or more
Node.js (https://nodejs.org/)
Appiumsoftware (http://appium.io/)
Seleniumjars(http://www.seleniumhq.org/download/)
Appiumjar(https://search.maven.org/#search%7Cga%7C1%7Cg%3Aio.appium%20a%3Ajava-
client)
.apkfile of the applicationwhichneedstobe tested
Preconditions:
make sure Eclipse isdownloaded fromwww.eclipse.org/downloads/
java isinstalled (bothjdkandjre)
androidsdk is installed
Make sure your environmentvariable (Path)forJava,AndroidSDK,Platformandplatform-tools
isset.
Stepsto setPath on windowsOS:
RightClick“My Computer”.
“Properties”
On leftpanel “Advance SystemSettings”
SelectEnvironmentVariables
SystemVariables->Type Path->“Path”double click
Enter the pathto JAVA jdkinyour systemfollowedby(;) thenpathtoyour androidsdk
(;) path to yourandroidplatform(;) pathto your androidplatformtools->ClickOK.
Make sure Eclipse Plug-inisinstalled
Stepsto install Eclipse Plug-inforAndroid:
Start Eclipse,thenselectHelp>Install New Software.
ClickAdd,inthe top-rightcorner.
In the AddRepositorydialogthatappears,enter"ADTPlugin"forthe Name andthe following
URL for the Location: https://dl-ssl.google.com/android/eclipse/
ClickOK(If you have trouble acquiringthe plugin,tryusing"http"inthe LocationURL, insteadof
"https"(httpsispreferredforsecurityreasons).
Make sure ANDROID_HOME variable isset.
2. Stepsto setANDROID_HOME variable:
Go to Eclipse->Windowontoppanel->Preferences->Double clickAndroidonleftpanel
In the Androidpreferences,Copythe SDKLocation
RightClick“My Computer”.
“Properties”
On leftpanel “Advance SystemSettings”
SelectEnvironmentVariables
On the top User Variables->Selectnew->Variable Name,EnterANDROID_HOME,
Variable Path->EntercopiedSDKlocationfromEclipse->ClickOK
ThenSystemVariables->Selectnew->Variable Name,EnterANDROID_HOME,Variable
Path->Enter copiedSDKlocationfromEclipse->ClickOK
Exit
Make sure AndroidVirtual DeviceManagercan be launched.
Eclipse->Windowontoppanel->AndroidVirtual Device Manager->Clickonthe existingvirtual
device if itexists/Create anewone withcustomizedconfigurations.->Clickon“Start” onthe
rightpanel of the window.->Launch
Launching Appium:
Install node.js(“http://nodejs.org/”).
Launch Appiumfromcommand line fromthe below location:
Goto Appiumfoldernode_modules appiumbinshift+rightclickopencommand
prompttype node appiumenter
Followingshouldbe displayed:
info:Welcome toAppium v1.3.4(REV c8c79a85fbd6870cd6fc3d66d038a115ebe22efe)
info:AppiumRESThttpinterface listenerstartedon0.0.0.0:4723
info:Console LogLevel:debug
info:AppiumRESThttpinterface listenerstartedon0.0.0.0:4723info: Console LogLevel:debug
Appiumcanalsobe fromappium.exefile.Followingscreenshouldbe displayed:
3. Write a Program to launch Appium inEclipse:
package appium.com;
importjava.net.MalformedURLException;
importjava.net.URL;
importorg.openqa.selenium.remote.CapabilityType;
importorg.openqa.selenium.remote.DesiredCapabilities;
importorg.openqa.selenium.remote.RemoteWebDriver;
5. }
}
Make sure the path of the apkfile inthe systemiscorrect
Make sure the path to the apk file inyoursystemiscorrectin the program.Use correct package
and activitywhichcanbe foundbydecompilingthe apk file.Fordecompilingapkfile,goto
http://www.decompileandroid.com.
Stepsto launch appiumfor android:
1. Firststart the appiumserveroncommandprompt or by runningthe appium.exe file.
2. Checkwhetherthe device isconnectedanddisplayedinadb:adbdevices
3. Execute the programon the Eclipse.The programwill getexecutedand.apk file whichwas
installedinthe device willlaunchthe app.