SlideShare une entreprise Scribd logo
1  sur  26
Get a start with
for Mobile Automation (Android)
TPC DECEMBER 2016 MEETUP
BY ABHISHEK YADAV (@ABHISHEKKYD)
Agenda
 Overview of Mobile Automation
 About Appium
 Overview of Appium over other open source tools
 Android Installation with emulator
 Scripting using Appium for Mobile Web Automation
 Scripting using Appium for Mobile App Automation
 Framework Development using Appium
 Appium iOS Automation
Overview of Mobile Automation
Now a days every organization prefers automated testing once a product
reaches to the stable phase to reduce the testing effort. Since testing cost is
an important factor for any project, organizations have started preferring
open source test automation tools (which have reached a stage where they
now rival the commercial ones) instead of investing in costly commercial
testing tools.
A variety of open source automation testing tools is available for almost all
types of testing such as functional, UAT, regression, performance etc. Some
open source tools are Appium, Calabash, MonkeyTalk, Robotium, etc.
About Appium
 Appium is an open source test automation framework for use with
native, hybrid and mobile web apps.
 It drives iOS, Android, and Windows apps using the WebDriver protocol.
 Importantly, Appium is “cross-platform”: it allows you to write tests against
multiple platforms (iOS, Android, Windows), using the same API. This
enables code reuse between iOS, Android, and Windows testsuites.
About Appium
Webdriver Controller
Instruments Controller
Instruments Command
Server
Unix Socket Server
Instruments Command
Client
Unix Socket Client
Instruments
Bootstrap.js
About Appium
Webdriver Controller
UIAutomator Controller
UIAutomator Client
TCP Client
Bootstrap.jar
UIAutomator Server
TCP Server
About Appium
Overview of Appium over other open
source tools
A huge number of mobile testing tools have been developed in recent years
to support mobile development. As more companies are developing mobile
products and the marketplace is seeing more devices, platforms, and versions,
testing your mobile apps is vital. When it comes choosing what mobile testing
tool is right for you, there is a huge array of options, each with different
strengths and weaknesses.
Overview of Appium over other open
source tools
Android Installation with emulator
 Android Studio provides the fastest tools for building apps on every type
of Android device.
 World-class code editing, debugging, performance tooling, a flexible build
system, and an instant build/deploy system all allow you to focus on
building unique and high quality apps.
https://developer.android.com/studio/index.html
Android Installation with emulator
Android Studio GUI
Android Installation with emulator
android
android avd
Command Line }
Scripting using Appium for Mobile
Web Automation
DesiredCapabilities capabilities = new DesiredCapabilities();
capabilities.setCapability("deviceName", "TestAndroid");
capabilities.setCapability("platformName", "Android");
capabilities.setCapability(CapabilityType.BROWSER_NAME, "browser");
capabilities.setCapability("platformVersion", "5.1");
driver = new AndroidDriver(new URL("http://127.0.0.1:4723/wd/hub"),
capabilities);
driver.manage().timeouts().implicitlyWait(80, TimeUnit.SECONDS);
driver.get("http://www.google.com");
WebElement keyword = driver.findElement(By.name("q"));
keyword.sendKeys("Hello Selenium");
Scripting using Appium for Mobile
App Automation
DesiredCapabilities capabilities = new DesiredCapabilities();
capabilities.setCapability("deviceName", "TestAndroid");
capabilities.setCapability("platformName", "Android");
capabilities.setCapability(CapabilityType.BROWSER_NAME, "Android");
capabilities.setCapability("platformVersion", "5.1");
capabilities.setCapability("appPackage", "com.android.calculator2");
capabilities.setCapability("appActivity","com.android.calculator2.Calculator
");
driver = new AndroidDriver(new URL("http://127.0.0.1:4723/wd/hub"),
capabilities);
driver.manage().timeouts().implicitlyWait(80, TimeUnit.SECONDS);
Framework Development using
Appium
 Apache Maven
 Page Objects
 TestNG
 ReportNG
 Allure
 Cucumber (BDD)
 Jenkins
Advanced Locator Strategies
 MobileBy
 ByAccessibilityId
 ByAndroidUIAutomator
MobileBy
DesiredCapabilities capabilities = new DesiredCapabilities();
capabilities.setCapability("deviceName", "TestAndroid");
capabilities.setCapability("platformName", "Android");
capabilities.setCapability(CapabilityType.BROWSER_NAME, "Android");
capabilities.setCapability("platformVersion", "5.1");
capabilities.setCapability("appPackage", "com.android.calculator2");
capabilities.setCapability("appActivity","com.android.calculator2.Calculator");
driver = new AndroidDriver(new URL("http://127.0.0.1:4723/wd/hub"),
capabilities);
driver.manage().timeouts().implicitlyWait(80, TimeUnit.SECONDS);
driver.findElement(MobileBy.name("4")).click();
ByAccessibilityId
DesiredCapabilities capabilities = new DesiredCapabilities();
capabilities.setCapability("deviceName", "TestAndroid");
capabilities.setCapability("platformName", "Android");
capabilities.setCapability(CapabilityType.BROWSER_NAME, "Android");
capabilities.setCapability("platformVersion", "5.1");
capabilities.setCapability("appPackage", "com.android.calculator2");
capabilities.setCapability("appActivity","com.android.calculator2.Calculator");
driver = new AndroidDriver(new URL("http://127.0.0.1:4723/wd/hub"),
capabilities);
driver.manage().timeouts().implicitlyWait(80, TimeUnit.SECONDS);
driver.findElement(MobileBy.name("4")).click();
driver.findElement(MobileBy.AccessibilityId("delete")).click();
ByAndroidUIAutomator
DesiredCapabilities capabilities = new DesiredCapabilities();
capabilities.setCapability("deviceName", "TestAndroid");
capabilities.setCapability("platformName", "Android");
capabilities.setCapability(CapabilityType.BROWSER_NAME, "Android");
capabilities.setCapability("platformVersion", "5.1");
capabilities.setCapability("appPackage", "com.android.calculator2");
capabilities.setCapability("appActivity","com.android.calculator2.Calculator");
driver = new AndroidDriver(new URL("http://127.0.0.1:4723/wd/hub"), capabilities);
driver.manage().timeouts().implicitlyWait(80, TimeUnit.SECONDS);
driver.findElement(MobileBy.AndroidUIAutomator("new UiSelector().text("3")")).click();
Appium iOS Automation
Appium iOS Automation
 IosUIAutomation
driver.findElementByIosUIAutomation
("tableViews()[0].cells(1).textViews()
.firstWithPredicate("name == New Delhi And NCR")");
Selenium
Version
Selenium 3.0 Launched!!
 Selenium 3.X is no longer capable of running Selenium RC directly, rather it
does it through emulation and the WebDriverBackedSelenium interface.
 You’ll need to be running Java 8 to use the Java pieces of Selenium. This
is the oldest version of Java officially supported by Oracle, so hopefully
you’re using it already!
 Support for Firefox is via Mozilla’s geckodriver.
 Support for Safari is provided on macOS (Sierra or later) via Apple’s
own safaridriver.
 Support for Edge is provided by MS through their webdriver server.
 Only versions 9 or above of IE are supported. Earlier versions may work,
but are no longer supported as MS no longer supports them.
http://www.helloselenium.com
References
 http://appium.io/
 https://appium.io/slate/en/tutorial/android.html
 https://github.com/appium/appium
 https://wiki.saucelabs.com/display/DOCS/Getting+Started+with+Appium+
for+Mobile+Native+Application+Testing
Appium overview
Appium overview

Contenu connexe

Tendances

Getting started with appium
Getting started with appiumGetting started with appium
Getting started with appiumPratik Patel
 
Android & iOS Automation Using Appium
Android & iOS Automation Using AppiumAndroid & iOS Automation Using Appium
Android & iOS Automation Using AppiumMindfire Solutions
 
Appium Presentation
Appium Presentation Appium Presentation
Appium Presentation OmarUsman6
 
Automation testing on ios platform using appium
Automation testing on ios platform using appiumAutomation testing on ios platform using appium
Automation testing on ios platform using appiumAmbreen Khan
 
Introduction To Mobile-Automation
Introduction To Mobile-AutomationIntroduction To Mobile-Automation
Introduction To Mobile-AutomationMindfire Solutions
 
Mobile Testing with Appium
Mobile Testing with AppiumMobile Testing with Appium
Mobile Testing with AppiumKnoldus Inc.
 
Appium an introduction
Appium   an introductionAppium   an introduction
Appium an introductionVivek Shringi
 
Appium Architecture | How Appium Works | Edureka
Appium Architecture | How Appium Works | EdurekaAppium Architecture | How Appium Works | Edureka
Appium Architecture | How Appium Works | EdurekaEdureka!
 
Mobile application testing
Mobile application testingMobile application testing
Mobile application testingvodQA
 
Mobile application testing tutorial
Mobile application testing tutorialMobile application testing tutorial
Mobile application testing tutorialLokesh Agrawal
 
Cross browser testing using BrowserStack
Cross browser testing using BrowserStack Cross browser testing using BrowserStack
Cross browser testing using BrowserStack RapidValue
 
Appium, Test-Driven Development, and Continuous Integration
Appium, Test-Driven Development, and Continuous IntegrationAppium, Test-Driven Development, and Continuous Integration
Appium, Test-Driven Development, and Continuous IntegrationTechWell
 
Mobile automation using Appium
Mobile automation using AppiumMobile automation using Appium
Mobile automation using AppiumSaroj Singh
 

Tendances (20)

Getting started with appium
Getting started with appiumGetting started with appium
Getting started with appium
 
Android & iOS Automation Using Appium
Android & iOS Automation Using AppiumAndroid & iOS Automation Using Appium
Android & iOS Automation Using Appium
 
Appium
AppiumAppium
Appium
 
Appium Presentation
Appium Presentation Appium Presentation
Appium Presentation
 
Automation testing on ios platform using appium
Automation testing on ios platform using appiumAutomation testing on ios platform using appium
Automation testing on ios platform using appium
 
Introduction To Mobile-Automation
Introduction To Mobile-AutomationIntroduction To Mobile-Automation
Introduction To Mobile-Automation
 
Automation using Appium
Automation using AppiumAutomation using Appium
Automation using Appium
 
Mobile Testing with Appium
Mobile Testing with AppiumMobile Testing with Appium
Mobile Testing with Appium
 
Appium an introduction
Appium   an introductionAppium   an introduction
Appium an introduction
 
Appium.pptx
Appium.pptxAppium.pptx
Appium.pptx
 
Appium Architecture | How Appium Works | Edureka
Appium Architecture | How Appium Works | EdurekaAppium Architecture | How Appium Works | Edureka
Appium Architecture | How Appium Works | Edureka
 
Automation With A Tool Demo
Automation With A Tool DemoAutomation With A Tool Demo
Automation With A Tool Demo
 
Mobile application testing
Mobile application testingMobile application testing
Mobile application testing
 
Mobile application testing tutorial
Mobile application testing tutorialMobile application testing tutorial
Mobile application testing tutorial
 
Cross browser testing using BrowserStack
Cross browser testing using BrowserStack Cross browser testing using BrowserStack
Cross browser testing using BrowserStack
 
Appium, Test-Driven Development, and Continuous Integration
Appium, Test-Driven Development, and Continuous IntegrationAppium, Test-Driven Development, and Continuous Integration
Appium, Test-Driven Development, and Continuous Integration
 
QSpiders - Automation using Selenium
QSpiders - Automation using SeleniumQSpiders - Automation using Selenium
QSpiders - Automation using Selenium
 
Mobile automation using Appium
Mobile automation using AppiumMobile automation using Appium
Mobile automation using Appium
 
Api Testing
Api TestingApi Testing
Api Testing
 
Automation testing
Automation testingAutomation testing
Automation testing
 

Similaire à Appium overview

Appium overview session final
Appium overview session finalAppium overview session final
Appium overview session finalAbhishek Yadav
 
The ultimate guide to mobile app testing with appium
The ultimate guide to mobile app testing with appiumThe ultimate guide to mobile app testing with appium
The ultimate guide to mobile app testing with appiumheadspin2
 
Mobile UI Testing using Appium and Docker
Mobile UI Testing using Appium and DockerMobile UI Testing using Appium and Docker
Mobile UI Testing using Appium and DockerMoataz Nabil
 
Decoding Appium No-Code Test Automation With HeadSpin.pdf
Decoding Appium No-Code Test Automation With HeadSpin.pdfDecoding Appium No-Code Test Automation With HeadSpin.pdf
Decoding Appium No-Code Test Automation With HeadSpin.pdfkalichargn70th171
 
100 effective software testing tools that boost your Testing
100 effective software testing tools that boost your Testing100 effective software testing tools that boost your Testing
100 effective software testing tools that boost your TestingBugRaptors
 
Android automation tools
Android automation toolsAndroid automation tools
Android automation toolsSSGMCE SHEGAON
 
Top 10 Automation Testing Tools in 2020
Top 10 Automation Testing Tools in 2020Top 10 Automation Testing Tools in 2020
Top 10 Automation Testing Tools in 2020Alaina Carter
 
Mobile Quality Night Vienna 2015 - Testobject Appium in der Cloud
Mobile Quality Night Vienna 2015 - Testobject Appium in der CloudMobile Quality Night Vienna 2015 - Testobject Appium in der Cloud
Mobile Quality Night Vienna 2015 - Testobject Appium in der CloudRudolf Grötz
 
Comprehensive List of Open Source QA Tools
Comprehensive List of Open Source QA ToolsComprehensive List of Open Source QA Tools
Comprehensive List of Open Source QA ToolsAshish Bansal
 
Appium understanding document
Appium understanding documentAppium understanding document
Appium understanding documentAkshay Pillay
 
The Best Automation Testing Tools To Use In 2022 | BMN Infotech
The Best Automation Testing Tools To Use In 2022 | BMN InfotechThe Best Automation Testing Tools To Use In 2022 | BMN Infotech
The Best Automation Testing Tools To Use In 2022 | BMN InfotechBMN Infotech
 
Top 10 Automation Testing Tools in 2020
Top 10 Automation Testing Tools in 2020Top 10 Automation Testing Tools in 2020
Top 10 Automation Testing Tools in 2020Marianne Harness
 
Top 15 Appium Interview Questions and Answers in 2023.pptx
Top 15 Appium Interview Questions and Answers in 2023.pptxTop 15 Appium Interview Questions and Answers in 2023.pptx
Top 15 Appium Interview Questions and Answers in 2023.pptxAnanthReddy38
 
Hybrid App Development with PhoneGap
Hybrid App Development with PhoneGapHybrid App Development with PhoneGap
Hybrid App Development with PhoneGapDotitude
 

Similaire à Appium overview (20)

Appium overview session final
Appium overview session finalAppium overview session final
Appium overview session final
 
The ultimate guide to mobile app testing with appium
The ultimate guide to mobile app testing with appiumThe ultimate guide to mobile app testing with appium
The ultimate guide to mobile app testing with appium
 
Appium solution
Appium solutionAppium solution
Appium solution
 
Mobile UI Testing using Appium and Docker
Mobile UI Testing using Appium and DockerMobile UI Testing using Appium and Docker
Mobile UI Testing using Appium and Docker
 
Next level of Appium
Next level of AppiumNext level of Appium
Next level of Appium
 
Decoding Appium No-Code Test Automation With HeadSpin.pdf
Decoding Appium No-Code Test Automation With HeadSpin.pdfDecoding Appium No-Code Test Automation With HeadSpin.pdf
Decoding Appium No-Code Test Automation With HeadSpin.pdf
 
100 effective software testing tools that boost your Testing
100 effective software testing tools that boost your Testing100 effective software testing tools that boost your Testing
100 effective software testing tools that boost your Testing
 
Android automation tools
Android automation toolsAndroid automation tools
Android automation tools
 
Top 10 Automation Testing Tools in 2020
Top 10 Automation Testing Tools in 2020Top 10 Automation Testing Tools in 2020
Top 10 Automation Testing Tools in 2020
 
Mobile Quality Night Vienna 2015 - Testobject Appium in der Cloud
Mobile Quality Night Vienna 2015 - Testobject Appium in der CloudMobile Quality Night Vienna 2015 - Testobject Appium in der Cloud
Mobile Quality Night Vienna 2015 - Testobject Appium in der Cloud
 
Android CI and Appium
Android CI and AppiumAndroid CI and Appium
Android CI and Appium
 
Comprehensive List of Open Source QA Tools
Comprehensive List of Open Source QA ToolsComprehensive List of Open Source QA Tools
Comprehensive List of Open Source QA Tools
 
Appium understanding document
Appium understanding documentAppium understanding document
Appium understanding document
 
Appium solution artizone
Appium solution   artizoneAppium solution   artizone
Appium solution artizone
 
The Best Automation Testing Tools To Use In 2022 | BMN Infotech
The Best Automation Testing Tools To Use In 2022 | BMN InfotechThe Best Automation Testing Tools To Use In 2022 | BMN Infotech
The Best Automation Testing Tools To Use In 2022 | BMN Infotech
 
Top 10 Automation Testing Tools in 2020
Top 10 Automation Testing Tools in 2020Top 10 Automation Testing Tools in 2020
Top 10 Automation Testing Tools in 2020
 
Mobile DevTest Dictionary
Mobile DevTest DictionaryMobile DevTest Dictionary
Mobile DevTest Dictionary
 
Top 15 Appium Interview Questions and Answers in 2023.pptx
Top 15 Appium Interview Questions and Answers in 2023.pptxTop 15 Appium Interview Questions and Answers in 2023.pptx
Top 15 Appium Interview Questions and Answers in 2023.pptx
 
Test Automation for Mobile Applications
Test Automation for Mobile ApplicationsTest Automation for Mobile Applications
Test Automation for Mobile Applications
 
Hybrid App Development with PhoneGap
Hybrid App Development with PhoneGapHybrid App Development with PhoneGap
Hybrid App Development with PhoneGap
 

Dernier

%in kempton park+277-882-255-28 abortion pills for sale in kempton park
%in kempton park+277-882-255-28 abortion pills for sale in kempton park %in kempton park+277-882-255-28 abortion pills for sale in kempton park
%in kempton park+277-882-255-28 abortion pills for sale in kempton park masabamasaba
 
AI & Machine Learning Presentation Template
AI & Machine Learning Presentation TemplateAI & Machine Learning Presentation Template
AI & Machine Learning Presentation TemplatePresentation.STUDIO
 
%in Benoni+277-882-255-28 abortion pills for sale in Benoni
%in Benoni+277-882-255-28 abortion pills for sale in Benoni%in Benoni+277-882-255-28 abortion pills for sale in Benoni
%in Benoni+277-882-255-28 abortion pills for sale in Benonimasabamasaba
 
WSO2CON 2024 - How to Run a Security Program
WSO2CON 2024 - How to Run a Security ProgramWSO2CON 2024 - How to Run a Security Program
WSO2CON 2024 - How to Run a Security ProgramWSO2
 
WSO2CON 2024 - WSO2's Digital Transformation Journey with Choreo: A Platforml...
WSO2CON 2024 - WSO2's Digital Transformation Journey with Choreo: A Platforml...WSO2CON 2024 - WSO2's Digital Transformation Journey with Choreo: A Platforml...
WSO2CON 2024 - WSO2's Digital Transformation Journey with Choreo: A Platforml...WSO2
 
%in Bahrain+277-882-255-28 abortion pills for sale in Bahrain
%in Bahrain+277-882-255-28 abortion pills for sale in Bahrain%in Bahrain+277-882-255-28 abortion pills for sale in Bahrain
%in Bahrain+277-882-255-28 abortion pills for sale in Bahrainmasabamasaba
 
WSO2CON 2024 - Building the API First Enterprise – Running an API Program, fr...
WSO2CON 2024 - Building the API First Enterprise – Running an API Program, fr...WSO2CON 2024 - Building the API First Enterprise – Running an API Program, fr...
WSO2CON 2024 - Building the API First Enterprise – Running an API Program, fr...WSO2
 
%+27788225528 love spells in Huntington Beach Psychic Readings, Attraction sp...
%+27788225528 love spells in Huntington Beach Psychic Readings, Attraction sp...%+27788225528 love spells in Huntington Beach Psychic Readings, Attraction sp...
%+27788225528 love spells in Huntington Beach Psychic Readings, Attraction sp...masabamasaba
 
WSO2CON 2024 Slides - Open Source to SaaS
WSO2CON 2024 Slides - Open Source to SaaSWSO2CON 2024 Slides - Open Source to SaaS
WSO2CON 2024 Slides - Open Source to SaaSWSO2
 
%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...
%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...
%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...masabamasaba
 
MarTech Trend 2024 Book : Marketing Technology Trends (2024 Edition) How Data...
MarTech Trend 2024 Book : Marketing Technology Trends (2024 Edition) How Data...MarTech Trend 2024 Book : Marketing Technology Trends (2024 Edition) How Data...
MarTech Trend 2024 Book : Marketing Technology Trends (2024 Edition) How Data...Jittipong Loespradit
 
WSO2CON2024 - It's time to go Platformless
WSO2CON2024 - It's time to go PlatformlessWSO2CON2024 - It's time to go Platformless
WSO2CON2024 - It's time to go PlatformlessWSO2
 
WSO2Con204 - Hard Rock Presentation - Keynote
WSO2Con204 - Hard Rock Presentation - KeynoteWSO2Con204 - Hard Rock Presentation - Keynote
WSO2Con204 - Hard Rock Presentation - KeynoteWSO2
 
%in Midrand+277-882-255-28 abortion pills for sale in midrand
%in Midrand+277-882-255-28 abortion pills for sale in midrand%in Midrand+277-882-255-28 abortion pills for sale in midrand
%in Midrand+277-882-255-28 abortion pills for sale in midrandmasabamasaba
 
WSO2Con2024 - Enabling Transactional System's Exponential Growth With Simplicity
WSO2Con2024 - Enabling Transactional System's Exponential Growth With SimplicityWSO2Con2024 - Enabling Transactional System's Exponential Growth With Simplicity
WSO2Con2024 - Enabling Transactional System's Exponential Growth With SimplicityWSO2
 
Devoxx UK 2024 - Going serverless with Quarkus, GraalVM native images and AWS...
Devoxx UK 2024 - Going serverless with Quarkus, GraalVM native images and AWS...Devoxx UK 2024 - Going serverless with Quarkus, GraalVM native images and AWS...
Devoxx UK 2024 - Going serverless with Quarkus, GraalVM native images and AWS...Bert Jan Schrijver
 
%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...
%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...
%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...masabamasaba
 
%+27788225528 love spells in Toronto Psychic Readings, Attraction spells,Brin...
%+27788225528 love spells in Toronto Psychic Readings, Attraction spells,Brin...%+27788225528 love spells in Toronto Psychic Readings, Attraction spells,Brin...
%+27788225528 love spells in Toronto Psychic Readings, Attraction spells,Brin...masabamasaba
 
WSO2CON 2024 - API Management Usage at La Poste and Its Impact on Business an...
WSO2CON 2024 - API Management Usage at La Poste and Its Impact on Business an...WSO2CON 2024 - API Management Usage at La Poste and Its Impact on Business an...
WSO2CON 2024 - API Management Usage at La Poste and Its Impact on Business an...WSO2
 

Dernier (20)

%in kempton park+277-882-255-28 abortion pills for sale in kempton park
%in kempton park+277-882-255-28 abortion pills for sale in kempton park %in kempton park+277-882-255-28 abortion pills for sale in kempton park
%in kempton park+277-882-255-28 abortion pills for sale in kempton park
 
AI & Machine Learning Presentation Template
AI & Machine Learning Presentation TemplateAI & Machine Learning Presentation Template
AI & Machine Learning Presentation Template
 
%in Benoni+277-882-255-28 abortion pills for sale in Benoni
%in Benoni+277-882-255-28 abortion pills for sale in Benoni%in Benoni+277-882-255-28 abortion pills for sale in Benoni
%in Benoni+277-882-255-28 abortion pills for sale in Benoni
 
WSO2CON 2024 - How to Run a Security Program
WSO2CON 2024 - How to Run a Security ProgramWSO2CON 2024 - How to Run a Security Program
WSO2CON 2024 - How to Run a Security Program
 
WSO2CON 2024 - WSO2's Digital Transformation Journey with Choreo: A Platforml...
WSO2CON 2024 - WSO2's Digital Transformation Journey with Choreo: A Platforml...WSO2CON 2024 - WSO2's Digital Transformation Journey with Choreo: A Platforml...
WSO2CON 2024 - WSO2's Digital Transformation Journey with Choreo: A Platforml...
 
%in Bahrain+277-882-255-28 abortion pills for sale in Bahrain
%in Bahrain+277-882-255-28 abortion pills for sale in Bahrain%in Bahrain+277-882-255-28 abortion pills for sale in Bahrain
%in Bahrain+277-882-255-28 abortion pills for sale in Bahrain
 
Abortion Pill Prices Tembisa [(+27832195400*)] 🏥 Women's Abortion Clinic in T...
Abortion Pill Prices Tembisa [(+27832195400*)] 🏥 Women's Abortion Clinic in T...Abortion Pill Prices Tembisa [(+27832195400*)] 🏥 Women's Abortion Clinic in T...
Abortion Pill Prices Tembisa [(+27832195400*)] 🏥 Women's Abortion Clinic in T...
 
WSO2CON 2024 - Building the API First Enterprise – Running an API Program, fr...
WSO2CON 2024 - Building the API First Enterprise – Running an API Program, fr...WSO2CON 2024 - Building the API First Enterprise – Running an API Program, fr...
WSO2CON 2024 - Building the API First Enterprise – Running an API Program, fr...
 
%+27788225528 love spells in Huntington Beach Psychic Readings, Attraction sp...
%+27788225528 love spells in Huntington Beach Psychic Readings, Attraction sp...%+27788225528 love spells in Huntington Beach Psychic Readings, Attraction sp...
%+27788225528 love spells in Huntington Beach Psychic Readings, Attraction sp...
 
WSO2CON 2024 Slides - Open Source to SaaS
WSO2CON 2024 Slides - Open Source to SaaSWSO2CON 2024 Slides - Open Source to SaaS
WSO2CON 2024 Slides - Open Source to SaaS
 
%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...
%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...
%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...
 
MarTech Trend 2024 Book : Marketing Technology Trends (2024 Edition) How Data...
MarTech Trend 2024 Book : Marketing Technology Trends (2024 Edition) How Data...MarTech Trend 2024 Book : Marketing Technology Trends (2024 Edition) How Data...
MarTech Trend 2024 Book : Marketing Technology Trends (2024 Edition) How Data...
 
WSO2CON2024 - It's time to go Platformless
WSO2CON2024 - It's time to go PlatformlessWSO2CON2024 - It's time to go Platformless
WSO2CON2024 - It's time to go Platformless
 
WSO2Con204 - Hard Rock Presentation - Keynote
WSO2Con204 - Hard Rock Presentation - KeynoteWSO2Con204 - Hard Rock Presentation - Keynote
WSO2Con204 - Hard Rock Presentation - Keynote
 
%in Midrand+277-882-255-28 abortion pills for sale in midrand
%in Midrand+277-882-255-28 abortion pills for sale in midrand%in Midrand+277-882-255-28 abortion pills for sale in midrand
%in Midrand+277-882-255-28 abortion pills for sale in midrand
 
WSO2Con2024 - Enabling Transactional System's Exponential Growth With Simplicity
WSO2Con2024 - Enabling Transactional System's Exponential Growth With SimplicityWSO2Con2024 - Enabling Transactional System's Exponential Growth With Simplicity
WSO2Con2024 - Enabling Transactional System's Exponential Growth With Simplicity
 
Devoxx UK 2024 - Going serverless with Quarkus, GraalVM native images and AWS...
Devoxx UK 2024 - Going serverless with Quarkus, GraalVM native images and AWS...Devoxx UK 2024 - Going serverless with Quarkus, GraalVM native images and AWS...
Devoxx UK 2024 - Going serverless with Quarkus, GraalVM native images and AWS...
 
%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...
%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...
%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...
 
%+27788225528 love spells in Toronto Psychic Readings, Attraction spells,Brin...
%+27788225528 love spells in Toronto Psychic Readings, Attraction spells,Brin...%+27788225528 love spells in Toronto Psychic Readings, Attraction spells,Brin...
%+27788225528 love spells in Toronto Psychic Readings, Attraction spells,Brin...
 
WSO2CON 2024 - API Management Usage at La Poste and Its Impact on Business an...
WSO2CON 2024 - API Management Usage at La Poste and Its Impact on Business an...WSO2CON 2024 - API Management Usage at La Poste and Its Impact on Business an...
WSO2CON 2024 - API Management Usage at La Poste and Its Impact on Business an...
 

Appium overview

  • 1. Get a start with for Mobile Automation (Android) TPC DECEMBER 2016 MEETUP BY ABHISHEK YADAV (@ABHISHEKKYD)
  • 2. Agenda  Overview of Mobile Automation  About Appium  Overview of Appium over other open source tools  Android Installation with emulator  Scripting using Appium for Mobile Web Automation  Scripting using Appium for Mobile App Automation  Framework Development using Appium  Appium iOS Automation
  • 3. Overview of Mobile Automation Now a days every organization prefers automated testing once a product reaches to the stable phase to reduce the testing effort. Since testing cost is an important factor for any project, organizations have started preferring open source test automation tools (which have reached a stage where they now rival the commercial ones) instead of investing in costly commercial testing tools. A variety of open source automation testing tools is available for almost all types of testing such as functional, UAT, regression, performance etc. Some open source tools are Appium, Calabash, MonkeyTalk, Robotium, etc.
  • 4. About Appium  Appium is an open source test automation framework for use with native, hybrid and mobile web apps.  It drives iOS, Android, and Windows apps using the WebDriver protocol.  Importantly, Appium is “cross-platform”: it allows you to write tests against multiple platforms (iOS, Android, Windows), using the same API. This enables code reuse between iOS, Android, and Windows testsuites.
  • 5. About Appium Webdriver Controller Instruments Controller Instruments Command Server Unix Socket Server Instruments Command Client Unix Socket Client Instruments Bootstrap.js
  • 6. About Appium Webdriver Controller UIAutomator Controller UIAutomator Client TCP Client Bootstrap.jar UIAutomator Server TCP Server
  • 8. Overview of Appium over other open source tools A huge number of mobile testing tools have been developed in recent years to support mobile development. As more companies are developing mobile products and the marketplace is seeing more devices, platforms, and versions, testing your mobile apps is vital. When it comes choosing what mobile testing tool is right for you, there is a huge array of options, each with different strengths and weaknesses.
  • 9. Overview of Appium over other open source tools
  • 10. Android Installation with emulator  Android Studio provides the fastest tools for building apps on every type of Android device.  World-class code editing, debugging, performance tooling, a flexible build system, and an instant build/deploy system all allow you to focus on building unique and high quality apps. https://developer.android.com/studio/index.html
  • 11. Android Installation with emulator Android Studio GUI
  • 12. Android Installation with emulator android android avd Command Line }
  • 13. Scripting using Appium for Mobile Web Automation DesiredCapabilities capabilities = new DesiredCapabilities(); capabilities.setCapability("deviceName", "TestAndroid"); capabilities.setCapability("platformName", "Android"); capabilities.setCapability(CapabilityType.BROWSER_NAME, "browser"); capabilities.setCapability("platformVersion", "5.1"); driver = new AndroidDriver(new URL("http://127.0.0.1:4723/wd/hub"), capabilities); driver.manage().timeouts().implicitlyWait(80, TimeUnit.SECONDS); driver.get("http://www.google.com"); WebElement keyword = driver.findElement(By.name("q")); keyword.sendKeys("Hello Selenium");
  • 14. Scripting using Appium for Mobile App Automation DesiredCapabilities capabilities = new DesiredCapabilities(); capabilities.setCapability("deviceName", "TestAndroid"); capabilities.setCapability("platformName", "Android"); capabilities.setCapability(CapabilityType.BROWSER_NAME, "Android"); capabilities.setCapability("platformVersion", "5.1"); capabilities.setCapability("appPackage", "com.android.calculator2"); capabilities.setCapability("appActivity","com.android.calculator2.Calculator "); driver = new AndroidDriver(new URL("http://127.0.0.1:4723/wd/hub"), capabilities); driver.manage().timeouts().implicitlyWait(80, TimeUnit.SECONDS);
  • 15. Framework Development using Appium  Apache Maven  Page Objects  TestNG  ReportNG  Allure  Cucumber (BDD)  Jenkins
  • 16. Advanced Locator Strategies  MobileBy  ByAccessibilityId  ByAndroidUIAutomator
  • 17. MobileBy DesiredCapabilities capabilities = new DesiredCapabilities(); capabilities.setCapability("deviceName", "TestAndroid"); capabilities.setCapability("platformName", "Android"); capabilities.setCapability(CapabilityType.BROWSER_NAME, "Android"); capabilities.setCapability("platformVersion", "5.1"); capabilities.setCapability("appPackage", "com.android.calculator2"); capabilities.setCapability("appActivity","com.android.calculator2.Calculator"); driver = new AndroidDriver(new URL("http://127.0.0.1:4723/wd/hub"), capabilities); driver.manage().timeouts().implicitlyWait(80, TimeUnit.SECONDS); driver.findElement(MobileBy.name("4")).click();
  • 18. ByAccessibilityId DesiredCapabilities capabilities = new DesiredCapabilities(); capabilities.setCapability("deviceName", "TestAndroid"); capabilities.setCapability("platformName", "Android"); capabilities.setCapability(CapabilityType.BROWSER_NAME, "Android"); capabilities.setCapability("platformVersion", "5.1"); capabilities.setCapability("appPackage", "com.android.calculator2"); capabilities.setCapability("appActivity","com.android.calculator2.Calculator"); driver = new AndroidDriver(new URL("http://127.0.0.1:4723/wd/hub"), capabilities); driver.manage().timeouts().implicitlyWait(80, TimeUnit.SECONDS); driver.findElement(MobileBy.name("4")).click(); driver.findElement(MobileBy.AccessibilityId("delete")).click();
  • 19. ByAndroidUIAutomator DesiredCapabilities capabilities = new DesiredCapabilities(); capabilities.setCapability("deviceName", "TestAndroid"); capabilities.setCapability("platformName", "Android"); capabilities.setCapability(CapabilityType.BROWSER_NAME, "Android"); capabilities.setCapability("platformVersion", "5.1"); capabilities.setCapability("appPackage", "com.android.calculator2"); capabilities.setCapability("appActivity","com.android.calculator2.Calculator"); driver = new AndroidDriver(new URL("http://127.0.0.1:4723/wd/hub"), capabilities); driver.manage().timeouts().implicitlyWait(80, TimeUnit.SECONDS); driver.findElement(MobileBy.AndroidUIAutomator("new UiSelector().text("3")")).click();
  • 21. Appium iOS Automation  IosUIAutomation driver.findElementByIosUIAutomation ("tableViews()[0].cells(1).textViews() .firstWithPredicate("name == New Delhi And NCR")");
  • 23. Selenium 3.0 Launched!!  Selenium 3.X is no longer capable of running Selenium RC directly, rather it does it through emulation and the WebDriverBackedSelenium interface.  You’ll need to be running Java 8 to use the Java pieces of Selenium. This is the oldest version of Java officially supported by Oracle, so hopefully you’re using it already!  Support for Firefox is via Mozilla’s geckodriver.  Support for Safari is provided on macOS (Sierra or later) via Apple’s own safaridriver.  Support for Edge is provided by MS through their webdriver server.  Only versions 9 or above of IE are supported. Earlier versions may work, but are no longer supported as MS no longer supports them. http://www.helloselenium.com
  • 24. References  http://appium.io/  https://appium.io/slate/en/tutorial/android.html  https://github.com/appium/appium  https://wiki.saucelabs.com/display/DOCS/Getting+Started+with+Appium+ for+Mobile+Native+Application+Testing