SlideShare a Scribd company logo
1 of 5
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.
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 Appiumfoldernode_modules appiumbinshift+rightclickopencommand
prompttype node appiumenter
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:
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;
publicclassAppiumLaunch
{
publicstaticvoidmain(Stringargs[]) throwsMalformedURLException
{
RemoteWebDriver driver;
DesiredCapabilities capabilities=new DesiredCapabilities();
capabilities.setCapability("platformName","Android");
capabilities.setCapability("deviceName","");
capabilities.setCapability("version","4.4.2");
capabilities.setCapability("device ID","");
capabilities.setCapability("app-package","");
capabilities.setCapability(CapabilityType.BROWSER_NAME,"");
capabilities.setCapability("app-activity","");
capabilities.setCapability("takesScreenshot",true);
capabilities.setCapability("app","C:/Users/.......apk");
driver=newRemoteWebDriver( new URL("http://127.0.0.1:4723/wd/hub"),capabilities);
System.out.println("appislaunchedonthe device");
}
}
 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.

More Related Content

Viewers also liked

Jeg kommer også i morgen
Jeg kommer også i morgenJeg kommer også i morgen
Jeg kommer også i morgenJanne Hjort
 
Education and training
Education and trainingEducation and training
Education and trainingKriti Sharma
 
Newsletter CSC 185, 10 de junho 2016
Newsletter CSC 185, 10 de junho   2016Newsletter CSC 185, 10 de junho   2016
Newsletter CSC 185, 10 de junho 2016Rui de Almeida
 
CURRICULUM VITAE DHLADHLA A.D.CENT
CURRICULUM VITAE DHLADHLA A.D.CENTCURRICULUM VITAE DHLADHLA A.D.CENT
CURRICULUM VITAE DHLADHLA A.D.CENTAnnah Dhladhla
 
Efecto del uso del frio y embalaje en la deshidratación de frutos
Efecto del uso del frio y embalaje en la deshidratación de frutosEfecto del uso del frio y embalaje en la deshidratación de frutos
Efecto del uso del frio y embalaje en la deshidratación de frutosJhonás A. Vega
 
Curso PROYECTO EMPRESARIAL– MARKETING – Clase06
Curso PROYECTO EMPRESARIAL– MARKETING – Clase06Curso PROYECTO EMPRESARIAL– MARKETING – Clase06
Curso PROYECTO EMPRESARIAL– MARKETING – Clase06LEOnardo AMARaldo DELgado
 
Curso PROYECTO EMPRESARIAL– MARKETING – Clase07
Curso PROYECTO EMPRESARIAL– MARKETING – Clase07Curso PROYECTO EMPRESARIAL– MARKETING – Clase07
Curso PROYECTO EMPRESARIAL– MARKETING – Clase07LEOnardo AMARaldo DELgado
 

Viewers also liked (11)

Jeg kommer også i morgen
Jeg kommer også i morgenJeg kommer også i morgen
Jeg kommer også i morgen
 
Education and training
Education and trainingEducation and training
Education and training
 
Newsletter CSC 185, 10 de junho 2016
Newsletter CSC 185, 10 de junho   2016Newsletter CSC 185, 10 de junho   2016
Newsletter CSC 185, 10 de junho 2016
 
Pràctica 3
Pràctica 3Pràctica 3
Pràctica 3
 
CURRICULUM VITAE DHLADHLA A.D.CENT
CURRICULUM VITAE DHLADHLA A.D.CENTCURRICULUM VITAE DHLADHLA A.D.CENT
CURRICULUM VITAE DHLADHLA A.D.CENT
 
EOP Annual Magazine (2008)
EOP Annual Magazine (2008)EOP Annual Magazine (2008)
EOP Annual Magazine (2008)
 
Efecto del uso del frio y embalaje en la deshidratación de frutos
Efecto del uso del frio y embalaje en la deshidratación de frutosEfecto del uso del frio y embalaje en la deshidratación de frutos
Efecto del uso del frio y embalaje en la deshidratación de frutos
 
Locust - Locusta migratoria
Locust - Locusta migratoriaLocust - Locusta migratoria
Locust - Locusta migratoria
 
cso_reports2
cso_reports2cso_reports2
cso_reports2
 
Curso PROYECTO EMPRESARIAL– MARKETING – Clase06
Curso PROYECTO EMPRESARIAL– MARKETING – Clase06Curso PROYECTO EMPRESARIAL– MARKETING – Clase06
Curso PROYECTO EMPRESARIAL– MARKETING – Clase06
 
Curso PROYECTO EMPRESARIAL– MARKETING – Clase07
Curso PROYECTO EMPRESARIAL– MARKETING – Clase07Curso PROYECTO EMPRESARIAL– MARKETING – Clase07
Curso PROYECTO EMPRESARIAL– MARKETING – Clase07
 

Similar to Appium For Testing Android App

Parkjihoon phonegap research_for_bada
Parkjihoon phonegap research_for_badaParkjihoon phonegap research_for_bada
Parkjihoon phonegap research_for_bada웹데브모바일
 
Android & iOS Automation Using Appium
Android & iOS Automation Using AppiumAndroid & iOS Automation Using Appium
Android & iOS Automation Using AppiumMindfire Solutions
 
Android studio
Android studioAndroid studio
Android studioAndri Yabu
 
Hosting Your Own OTA Update Service
Hosting Your Own OTA Update ServiceHosting Your Own OTA Update Service
Hosting Your Own OTA Update ServiceQuinlan Jung
 
Null Dubai Humla_Romansh_Yadav_Android_app_pentesting
Null Dubai Humla_Romansh_Yadav_Android_app_pentestingNull Dubai Humla_Romansh_Yadav_Android_app_pentesting
Null Dubai Humla_Romansh_Yadav_Android_app_pentestingRomansh Yadav
 
Introduction to Apache Cordova (Phonegap)
Introduction to Apache Cordova (Phonegap)Introduction to Apache Cordova (Phonegap)
Introduction to Apache Cordova (Phonegap)ejlp12
 
JDD 2017: 7 things which you should care about before release your code to pr...
JDD 2017: 7 things which you should care about before release your code to pr...JDD 2017: 7 things which you should care about before release your code to pr...
JDD 2017: 7 things which you should care about before release your code to pr...PROIDEA
 
Android tools for testers
Android tools for testersAndroid tools for testers
Android tools for testersMaksim Kovalev
 
Building Android games using LibGDX
Building Android games using LibGDXBuilding Android games using LibGDX
Building Android games using LibGDXJussi Pohjolainen
 
Intro to Building Android Games using libGDX
Intro to Building Android Games using libGDXIntro to Building Android Games using libGDX
Intro to Building Android Games using libGDXJussi Pohjolainen
 
Nodejs Intro - Part2 Introduction to Web Applications
Nodejs Intro - Part2 Introduction to Web ApplicationsNodejs Intro - Part2 Introduction to Web Applications
Nodejs Intro - Part2 Introduction to Web ApplicationsBudh Ram Gurung
 
WebAPIs & Apps - Mozilla London
WebAPIs & Apps - Mozilla LondonWebAPIs & Apps - Mozilla London
WebAPIs & Apps - Mozilla LondonRobert Nyman
 

Similar to Appium For Testing Android App (20)

Parkjihoon phonegap research_for_bada
Parkjihoon phonegap research_for_badaParkjihoon phonegap research_for_bada
Parkjihoon phonegap research_for_bada
 
Android & iOS Automation Using Appium
Android & iOS Automation Using AppiumAndroid & iOS Automation Using Appium
Android & iOS Automation Using Appium
 
APPIUM
APPIUMAPPIUM
APPIUM
 
Appium
AppiumAppium
Appium
 
React Native
React NativeReact Native
React Native
 
Android studio
Android studioAndroid studio
Android studio
 
Android Lab
Android LabAndroid Lab
Android Lab
 
Hosting Your Own OTA Update Service
Hosting Your Own OTA Update ServiceHosting Your Own OTA Update Service
Hosting Your Own OTA Update Service
 
Null Dubai Humla_Romansh_Yadav_Android_app_pentesting
Null Dubai Humla_Romansh_Yadav_Android_app_pentestingNull Dubai Humla_Romansh_Yadav_Android_app_pentesting
Null Dubai Humla_Romansh_Yadav_Android_app_pentesting
 
Introduction to Apache Cordova (Phonegap)
Introduction to Apache Cordova (Phonegap)Introduction to Apache Cordova (Phonegap)
Introduction to Apache Cordova (Phonegap)
 
JDD 2017: 7 things which you should care about before release your code to pr...
JDD 2017: 7 things which you should care about before release your code to pr...JDD 2017: 7 things which you should care about before release your code to pr...
JDD 2017: 7 things which you should care about before release your code to pr...
 
Android tools for testers
Android tools for testersAndroid tools for testers
Android tools for testers
 
Android CI and Appium
Android CI and AppiumAndroid CI and Appium
Android CI and Appium
 
Building Android games using LibGDX
Building Android games using LibGDXBuilding Android games using LibGDX
Building Android games using LibGDX
 
Intro to Building Android Games using libGDX
Intro to Building Android Games using libGDXIntro to Building Android Games using libGDX
Intro to Building Android Games using libGDX
 
Spring Lab
Spring LabSpring Lab
Spring Lab
 
Android utilities
Android utilitiesAndroid utilities
Android utilities
 
Core Android
Core AndroidCore Android
Core Android
 
Nodejs Intro - Part2 Introduction to Web Applications
Nodejs Intro - Part2 Introduction to Web ApplicationsNodejs Intro - Part2 Introduction to Web Applications
Nodejs Intro - Part2 Introduction to Web Applications
 
WebAPIs & Apps - Mozilla London
WebAPIs & Apps - Mozilla LondonWebAPIs & Apps - Mozilla London
WebAPIs & Apps - Mozilla London
 

Appium For Testing Android App

  • 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 Appiumfoldernode_modules appiumbinshift+rightclickopencommand prompttype node appiumenter 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;
  • 4. publicclassAppiumLaunch { publicstaticvoidmain(Stringargs[]) throwsMalformedURLException { RemoteWebDriver driver; DesiredCapabilities capabilities=new DesiredCapabilities(); capabilities.setCapability("platformName","Android"); capabilities.setCapability("deviceName",""); capabilities.setCapability("version","4.4.2"); capabilities.setCapability("device ID",""); capabilities.setCapability("app-package",""); capabilities.setCapability(CapabilityType.BROWSER_NAME,""); capabilities.setCapability("app-activity",""); capabilities.setCapability("takesScreenshot",true); capabilities.setCapability("app","C:/Users/.......apk"); driver=newRemoteWebDriver( new URL("http://127.0.0.1:4723/wd/hub"),capabilities); System.out.println("appislaunchedonthe device");
  • 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.