SlideShare ist ein Scribd-Unternehmen logo
1 von 32
Automated UI Testing for
Web and Native Apps on
iOS and Android




                    Operation Mobile
What I’ll be covering

     What are automated UI tests and why should you
     care?

     How to test mobile web apps

     How to test native Android apps

     Common automation test pitfalls

     How to pick a test framework

     The future and how to test native iOS apps


                                        Operation Mobile
The difference between unit and automation
tests

Performing actions on a user
interface (UI)



Automated UI tests are done at
a higher level than unit tests




                                  Operation Mobile
All that matters is the total is what we expect




                                      Operation Mobile
We will be automating UI tests for a calculator


              1.   Can add two numbers together

                   Given the user enters 1 and 2
                   When the user touches calculate
                   Then the total should be 3


              2.   Can clear the screen

                   Given the user enters 1 and 2
                   When the user touches clear
                   Then the first number should be blank
                   And the second number should be blank
                   And the total should be 0




                                               Operation Mobile
Why do automated UI testing for mobile apps?




Design and marketing will get you users
But if an app doesn’t function properly
Users might give one star ratings and won’t
recommend it


                                          Operation Mobile
Each new function = something else to test




iCalc v1    iCalc v2       iCalc v3       iCalc v4
 Add        Add           Add           Add
   Clear      Clear         Clear         Clear
               Subtract      Subtract      Subtract
                              Multiply      Multiply
                                             Divide



                                          Operation Mobile
Each new view = somewhere else to test




                                  Operation Mobile
Will you really remember to test everything?

        Because you decide to go on holiday for a
        while... around the world



        You developed another app




        You’re human




                                       Operation MOBILE
But I never changed that bit...

        Forgot that something else also used that
        code

        Made an accidental typo because you’re
        human




                                       Operation Mobile
What about if you work in a team?

        Do you know how to test what each other
        have done?




                                      Operation Mobile
Automated UI tests can run on multiple devices

        Run the same tests for tablet and phone
        using simulator saving you time

        Run different tests for tablet and phone
        using simulator saving you time and
        remembering what to test on what device




                                       Operation Mobile
Automated UI tests can target SDKs

        Run tests for older version for backwards
        compatibility saving you time


        Run tests on newer versions to give you a
        heads up




                                       Operation Mobile
Automated UI tests vs. QA

        Never be as good as having a (good) QA




        But will be cheaper



        And faster




                                      Operation Mobile
On the subject of cost automated UI testing is...

        Every framework I’ll be showing you is open
        source




                                       Operation Mobile
Automating UI tests for Web Apps




          Selenium - http://seleniumhq.org/




                                      Operation Mobile
How Selenium works


         Install and run iWebDriver application
         onto the device. This runs a webserver
         which listens for commands...



         which you send from your computer.
         Similar to using a remote control.




                                      Operation Mobile
Automated UI tests for web apps using Selenium




  Watch this video on YouTube - http://youtu.be/51E3FWMKkig




                                                Operation Mobile
Same for Android

   Follow the instructions here:
    http://code.google.com/p/selenium/wiki/AndroidDriver


   Install an APK instead of an APP

   Set up port forwarding




                                                    Operation Mobile
Automated UI tests for native Android apps

The good news is...


              A UI Automation test framework already
              comes with the Android SDK

              But we are not going to use it (directly
              anyway) because...




                                           Operation Mobile
Robotium is the best way to test Android Apps

        Robotium   http://code.google.com/p/robotium/



        Uses the Android test framework and solves
        a very important issue...




                                              Operation Mobile
Can deal with tests running faster than UI threads

        Your UI test can perform actions faster than
        you can but...



        that means it will expect something to
        happen faster the UI finishes its task


        Robotium is clever enough to wait for things
        to happen – no sleeps required!



                                        Operation Mobile
Why use Robotium instead of standard SDK

       Robotium uses Solo, which allows to
       simulate gestures



       Active community to help if you get stuck




       Gets updated more often than Android SDK



                                      Operation Mobile
Automating Android native apps using Robotium




  Watch this video on YouTube - http://youtu.be/XsNxZn7f7Xc




                                                 Operation Mobile
Common pitfalls of automated UI testing

      Too many unnecessary tests that don’t
      add value e.g. testing the SDK

      Fragile tests use position
      index, hierarchy in layout etc.


      Too many changes in one go


      Over reliance on one person – he’s the
      <insert role> guy


                                        Operation Mobile
How to pick the right framework


       Get your hands dirty and try it out


       Good learning resources


       Good community support


       Does it have ‘most’ of the functionality
       you require?


                                          Operation Mobile
The future...

          So far all tests you’ve seen look like
          they’ve been written by developers...


          but we’re testing at a higher level than
          unit tests...


          because we’re testing behaviour (BDD)


            So why can’t our tests be written in
            English?

                                          Operation Mobile
Calculator tests in English

Scenario: Can add two numbers together
When I type "1" into "firstNumber“
And I type "2" into "secondNumber"
And I touch the "Calculate" button
Then the total should be 3

Scenario: Can clear all fields
When I type "1" into "firstNumber"
And I type "2" into "secondNumber"
And I touch the "Clear" button
Then the total should be 0
And the "firstNumber" should be empty
And the "secondNumber" should be empty



                                         Operation Mobile
Frank + Cucumber + UISpec makes this possible

      Frank - https://github.com/moredip/Frank
      (By Universal Studios (Frankenstein promotional photo) [Public domain], via Wikimedia Commons)




      Uses Cucumber and UISpec to run
      scenarios as automated UI tests


      Cucumber uses Ruby to convert text into code

      But lots of built in steps for you to use
      e.g. When I touch <UI Element>


                                                                                           Operation Mobile
Automated UI tests for iOS native apps with Frank




  Watch this video on YouTube - http://youtu.be/tvv7kbvNb-8




                                                  Operation Mobile
Why automate UI tests using scenarios?


        Perfect match for storyboards (new in
        iOS 5)


        And because they can be converted in
        into Objective C, Java etc...


        The same scenario could be used test
        the same app on iOS, Android, Windows,
        Balckberry etc.


                                      Operation Mobile
To conclude…


      Get your hands dirty and try it out




                                        Operation Mobile

Weitere ähnliche Inhalte

Was ist angesagt?

Mobile automation testing with selenium and appium
Mobile automation testing with selenium and appiumMobile automation testing with selenium and appium
Mobile automation testing with selenium and appiumBugRaptors
 
Getting started with appium
Getting started with appiumGetting started with appium
Getting started with appiumPratik Patel
 
Different Android Test Automation Frameworks - What Works You the Best?
Different Android Test Automation Frameworks - What Works You the Best?Different Android Test Automation Frameworks - What Works You the Best?
Different Android Test Automation Frameworks - What Works You the Best?Bitbar
 
Appium Interview Questions and Answers | Edureka
Appium Interview Questions and Answers | EdurekaAppium Interview Questions and Answers | Edureka
Appium Interview Questions and Answers | EdurekaEdureka!
 
Android automation tools
Android automation toolsAndroid automation tools
Android automation toolsSSGMCE SHEGAON
 
Mobile Test Automation - Appium
Mobile Test Automation - AppiumMobile Test Automation - Appium
Mobile Test Automation - AppiumMaria Machlowska
 
MonkeyTalk Automation Testing For Android Application
MonkeyTalk Automation Testing For Android ApplicationMonkeyTalk Automation Testing For Android Application
MonkeyTalk Automation Testing For Android ApplicationContusQA
 
Appium Mobile Test Automation like WebDriver
Appium Mobile Test Automation like WebDriverAppium Mobile Test Automation like WebDriver
Appium Mobile Test Automation like WebDriverAndrii Dzynia
 
Appium overview (Selenium Israel #2, Feb. 2014)
Appium overview (Selenium Israel #2, Feb. 2014)Appium overview (Selenium Israel #2, Feb. 2014)
Appium overview (Selenium Israel #2, Feb. 2014)danielputerman
 
Appium basics
Appium basicsAppium basics
Appium basicsSyam Sasi
 
[Srijan Wednesday Webinar] Mastering Mobile Test Automation with Appium
[Srijan Wednesday Webinar] Mastering Mobile Test Automation with Appium[Srijan Wednesday Webinar] Mastering Mobile Test Automation with Appium
[Srijan Wednesday Webinar] Mastering Mobile Test Automation with AppiumSrijan Technologies
 
Android & iOS Automation Using Appium
Android & iOS Automation Using AppiumAndroid & iOS Automation Using Appium
Android & iOS Automation Using AppiumMindfire Solutions
 
Android UI Testing with Appium
Android UI Testing with AppiumAndroid UI Testing with Appium
Android UI Testing with AppiumLuke Maung
 
Appium - test automation for mobile apps
Appium - test automation for mobile appsAppium - test automation for mobile apps
Appium - test automation for mobile appsAleksejs Trescalins
 
Appium meet up noida
Appium meet up noidaAppium meet up noida
Appium meet up noidaAmit Rawat
 
Appium workship, Mobile Web+Dev Conference
Appium workship,  Mobile Web+Dev ConferenceAppium workship,  Mobile Web+Dev Conference
Appium workship, Mobile Web+Dev ConferenceIsaac Murchie
 

Was ist angesagt? (20)

Mobile automation testing with selenium and appium
Mobile automation testing with selenium and appiumMobile automation testing with selenium and appium
Mobile automation testing with selenium and appium
 
Getting started with appium
Getting started with appiumGetting started with appium
Getting started with appium
 
Appium
AppiumAppium
Appium
 
Appium ppt
Appium pptAppium ppt
Appium ppt
 
Different Android Test Automation Frameworks - What Works You the Best?
Different Android Test Automation Frameworks - What Works You the Best?Different Android Test Automation Frameworks - What Works You the Best?
Different Android Test Automation Frameworks - What Works You the Best?
 
Appium Interview Questions and Answers | Edureka
Appium Interview Questions and Answers | EdurekaAppium Interview Questions and Answers | Edureka
Appium Interview Questions and Answers | Edureka
 
Android automation tools
Android automation toolsAndroid automation tools
Android automation tools
 
Mobile Test Automation - Appium
Mobile Test Automation - AppiumMobile Test Automation - Appium
Mobile Test Automation - Appium
 
MonkeyTalk Automation Testing For Android Application
MonkeyTalk Automation Testing For Android ApplicationMonkeyTalk Automation Testing For Android Application
MonkeyTalk Automation Testing For Android Application
 
Appium Mobile Test Automation like WebDriver
Appium Mobile Test Automation like WebDriverAppium Mobile Test Automation like WebDriver
Appium Mobile Test Automation like WebDriver
 
BCS Selenium Workshop
BCS Selenium WorkshopBCS Selenium Workshop
BCS Selenium Workshop
 
Appium overview (Selenium Israel #2, Feb. 2014)
Appium overview (Selenium Israel #2, Feb. 2014)Appium overview (Selenium Israel #2, Feb. 2014)
Appium overview (Selenium Israel #2, Feb. 2014)
 
Appium basics
Appium basicsAppium basics
Appium basics
 
[Srijan Wednesday Webinar] Mastering Mobile Test Automation with Appium
[Srijan Wednesday Webinar] Mastering Mobile Test Automation with Appium[Srijan Wednesday Webinar] Mastering Mobile Test Automation with Appium
[Srijan Wednesday Webinar] Mastering Mobile Test Automation with Appium
 
Android & iOS Automation Using Appium
Android & iOS Automation Using AppiumAndroid & iOS Automation Using Appium
Android & iOS Automation Using Appium
 
Android UI Testing with Appium
Android UI Testing with AppiumAndroid UI Testing with Appium
Android UI Testing with Appium
 
Appium - test automation for mobile apps
Appium - test automation for mobile appsAppium - test automation for mobile apps
Appium - test automation for mobile apps
 
Appium overview
Appium overviewAppium overview
Appium overview
 
Appium meet up noida
Appium meet up noidaAppium meet up noida
Appium meet up noida
 
Appium workship, Mobile Web+Dev Conference
Appium workship,  Mobile Web+Dev ConferenceAppium workship,  Mobile Web+Dev Conference
Appium workship, Mobile Web+Dev Conference
 

Andere mochten auch

QA on a Large-Scale Medical Project. Automation as a Necessity
QA on a Large-Scale Medical Project. Automation as a NecessityQA on a Large-Scale Medical Project. Automation as a Necessity
QA on a Large-Scale Medical Project. Automation as a NecessityGlobalLogic Ukraine
 
Advanced Coded UI Testing
Advanced Coded UI TestingAdvanced Coded UI Testing
Advanced Coded UI TestingShai Raiten
 
Boston meetup blaze_meter_feb2017
Boston meetup blaze_meter_feb2017Boston meetup blaze_meter_feb2017
Boston meetup blaze_meter_feb2017Perfecto Mobile
 
Mobile Application Testing
Mobile Application TestingMobile Application Testing
Mobile Application TestingSWAAM Tech
 
Mobile App Testing Checklist
Mobile App Testing ChecklistMobile App Testing Checklist
Mobile App Testing ChecklistManoj Lonar
 
The Future of UI - How Mobile Design is Shaping The Web 2
The Future of UI - How Mobile Design is Shaping The Web 2The Future of UI - How Mobile Design is Shaping The Web 2
The Future of UI - How Mobile Design is Shaping The Web 2Sara Cannon
 
Cloud based Testing Mobile Apps
Cloud based Testing Mobile AppsCloud based Testing Mobile Apps
Cloud based Testing Mobile AppsIndicThreads
 
Simple Steps to UX/UI Web Design
Simple Steps to UX/UI Web DesignSimple Steps to UX/UI Web Design
Simple Steps to UX/UI Web DesignKoombea
 
The Future Of Work & The Work Of The Future
The Future Of Work & The Work Of The FutureThe Future Of Work & The Work Of The Future
The Future Of Work & The Work Of The FutureArturo Pelayo
 

Andere mochten auch (10)

QA on a Large-Scale Medical Project. Automation as a Necessity
QA on a Large-Scale Medical Project. Automation as a NecessityQA on a Large-Scale Medical Project. Automation as a Necessity
QA on a Large-Scale Medical Project. Automation as a Necessity
 
Advanced Coded UI Testing
Advanced Coded UI TestingAdvanced Coded UI Testing
Advanced Coded UI Testing
 
10 Benefits of Automated Testing
10 Benefits of Automated Testing10 Benefits of Automated Testing
10 Benefits of Automated Testing
 
Boston meetup blaze_meter_feb2017
Boston meetup blaze_meter_feb2017Boston meetup blaze_meter_feb2017
Boston meetup blaze_meter_feb2017
 
Mobile Application Testing
Mobile Application TestingMobile Application Testing
Mobile Application Testing
 
Mobile App Testing Checklist
Mobile App Testing ChecklistMobile App Testing Checklist
Mobile App Testing Checklist
 
The Future of UI - How Mobile Design is Shaping The Web 2
The Future of UI - How Mobile Design is Shaping The Web 2The Future of UI - How Mobile Design is Shaping The Web 2
The Future of UI - How Mobile Design is Shaping The Web 2
 
Cloud based Testing Mobile Apps
Cloud based Testing Mobile AppsCloud based Testing Mobile Apps
Cloud based Testing Mobile Apps
 
Simple Steps to UX/UI Web Design
Simple Steps to UX/UI Web DesignSimple Steps to UX/UI Web Design
Simple Steps to UX/UI Web Design
 
The Future Of Work & The Work Of The Future
The Future Of Work & The Work Of The FutureThe Future Of Work & The Work Of The Future
The Future Of Work & The Work Of The Future
 

Ähnlich wie Automated UI Testing for Web and Native Apps on iOS and Android

How to Master Mobile Automation in QA
How to Master Mobile Automation in QAHow to Master Mobile Automation in QA
How to Master Mobile Automation in QAOxagile
 
Cucumber meets iPhone
Cucumber meets iPhoneCucumber meets iPhone
Cucumber meets iPhoneErin Dees
 
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
 
What Are Virtual Devices And How To Use Them For Testing.pdf
What Are Virtual Devices And How To Use Them For Testing.pdfWhat Are Virtual Devices And How To Use Them For Testing.pdf
What Are Virtual Devices And How To Use Them For Testing.pdfpCloudy
 
Velocity Conference: Increasing Speed To Market In Mobile Development Through...
Velocity Conference: Increasing Speed To Market In Mobile Development Through...Velocity Conference: Increasing Speed To Market In Mobile Development Through...
Velocity Conference: Increasing Speed To Market In Mobile Development Through...Intuit Inc.
 
The Future of Selenium Testing for Mobile Web and Native Apps
The Future of Selenium Testing for Mobile Web and Native AppsThe Future of Selenium Testing for Mobile Web and Native Apps
The Future of Selenium Testing for Mobile Web and Native AppsSauce Labs
 
Automated Application Testing
Automated Application TestingAutomated Application Testing
Automated Application TestingCodal
 
2012 mobile testingsummit-moet
2012 mobile testingsummit-moet2012 mobile testingsummit-moet
2012 mobile testingsummit-moetEing Ong
 
Velocity2013 mobile ci_intuit
Velocity2013 mobile ci_intuitVelocity2013 mobile ci_intuit
Velocity2013 mobile ci_intuitTina Su
 
Speed to Market in Mobile Development
Speed to Market in Mobile DevelopmentSpeed to Market in Mobile Development
Speed to Market in Mobile DevelopmentTina Su
 
Velocity2013 mobile ci_intuit
Velocity2013 mobile ci_intuitVelocity2013 mobile ci_intuit
Velocity2013 mobile ci_intuitTina Su
 
Functional Requirements Of System Requirements
Functional Requirements Of System RequirementsFunctional Requirements Of System Requirements
Functional Requirements Of System RequirementsLaura Arrigo
 
Android testing
Android testingAndroid testing
Android testingBitbar
 
Mobile applications and automation testing
Mobile applications and automation testingMobile applications and automation testing
Mobile applications and automation testingDipesh Bhatewara
 
Android testing
Android testingAndroid testing
Android testingJinaTm
 
GDG DevFest Istanbul - Mobile DevOps - Build, Test and Deploy Your Android Ap...
GDG DevFest Istanbul - Mobile DevOps - Build, Test and Deploy Your Android Ap...GDG DevFest Istanbul - Mobile DevOps - Build, Test and Deploy Your Android Ap...
GDG DevFest Istanbul - Mobile DevOps - Build, Test and Deploy Your Android Ap...İbrahim KIVANÇ
 
Benefits of using native automation tooling for mobile application testing.pptx
Benefits of using native automation tooling for mobile application testing.pptxBenefits of using native automation tooling for mobile application testing.pptx
Benefits of using native automation tooling for mobile application testing.pptxMesut Günes
 
Appium: the Superhero of Mobile testing
Appium: the Superhero of Mobile testingAppium: the Superhero of Mobile testing
Appium: the Superhero of Mobile testingInfotek Solutions
 

Ähnlich wie Automated UI Testing for Web and Native Apps on iOS and Android (20)

How to Master Mobile Automation in QA
How to Master Mobile Automation in QAHow to Master Mobile Automation in QA
How to Master Mobile Automation in QA
 
Cucumber meets iPhone
Cucumber meets iPhoneCucumber meets iPhone
Cucumber meets iPhone
 
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
 
What Are Virtual Devices And How To Use Them For Testing.pdf
What Are Virtual Devices And How To Use Them For Testing.pdfWhat Are Virtual Devices And How To Use Them For Testing.pdf
What Are Virtual Devices And How To Use Them For Testing.pdf
 
Velocity Conference: Increasing Speed To Market In Mobile Development Through...
Velocity Conference: Increasing Speed To Market In Mobile Development Through...Velocity Conference: Increasing Speed To Market In Mobile Development Through...
Velocity Conference: Increasing Speed To Market In Mobile Development Through...
 
The Future of Selenium Testing for Mobile Web and Native Apps
The Future of Selenium Testing for Mobile Web and Native AppsThe Future of Selenium Testing for Mobile Web and Native Apps
The Future of Selenium Testing for Mobile Web and Native Apps
 
Automated Application Testing
Automated Application TestingAutomated Application Testing
Automated Application Testing
 
2012 mobile testingsummit-moet
2012 mobile testingsummit-moet2012 mobile testingsummit-moet
2012 mobile testingsummit-moet
 
Velocity2013 mobile ci_intuit
Velocity2013 mobile ci_intuitVelocity2013 mobile ci_intuit
Velocity2013 mobile ci_intuit
 
Speed to Market in Mobile Development
Speed to Market in Mobile DevelopmentSpeed to Market in Mobile Development
Speed to Market in Mobile Development
 
Velocity2013 mobile ci_intuit
Velocity2013 mobile ci_intuitVelocity2013 mobile ci_intuit
Velocity2013 mobile ci_intuit
 
Functional Requirements Of System Requirements
Functional Requirements Of System RequirementsFunctional Requirements Of System Requirements
Functional Requirements Of System Requirements
 
Android testing
Android testingAndroid testing
Android testing
 
Mobile applications and automation testing
Mobile applications and automation testingMobile applications and automation testing
Mobile applications and automation testing
 
Android testing
Android testingAndroid testing
Android testing
 
GDG DevFest Istanbul - Mobile DevOps - Build, Test and Deploy Your Android Ap...
GDG DevFest Istanbul - Mobile DevOps - Build, Test and Deploy Your Android Ap...GDG DevFest Istanbul - Mobile DevOps - Build, Test and Deploy Your Android Ap...
GDG DevFest Istanbul - Mobile DevOps - Build, Test and Deploy Your Android Ap...
 
Benefits of using native automation tooling for mobile application testing.pptx
Benefits of using native automation tooling for mobile application testing.pptxBenefits of using native automation tooling for mobile application testing.pptx
Benefits of using native automation tooling for mobile application testing.pptx
 
iOS Application Testing
iOS Application TestingiOS Application Testing
iOS Application Testing
 
Android Session.pdf
Android Session.pdfAndroid Session.pdf
Android Session.pdf
 
Appium: the Superhero of Mobile testing
Appium: the Superhero of Mobile testingAppium: the Superhero of Mobile testing
Appium: the Superhero of Mobile testing
 

Kürzlich hochgeladen

AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAndrey Devyatkin
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...DianaGray10
 
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingRepurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingEdi Saputra
 
[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdf[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdfSandro Moreira
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024The Digital Insurer
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc
 
MS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectorsMS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectorsNanddeep Nachan
 
Ransomware_Q4_2023. The report. [EN].pdf
Ransomware_Q4_2023. The report. [EN].pdfRansomware_Q4_2023. The report. [EN].pdf
Ransomware_Q4_2023. The report. [EN].pdfOverkill Security
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...Martijn de Jong
 
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...Zilliz
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerThousandEyes
 
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...apidays
 
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ..."I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...Zilliz
 
Artificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyArtificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyKhushali Kathiriya
 
CNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In PakistanCNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In Pakistandanishmna97
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherRemote DBA Services
 
Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native ApplicationsWSO2
 
FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024The Digital Insurer
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoffsammart93
 
AXA XL - Insurer Innovation Award Americas 2024
AXA XL - Insurer Innovation Award Americas 2024AXA XL - Insurer Innovation Award Americas 2024
AXA XL - Insurer Innovation Award Americas 2024The Digital Insurer
 

Kürzlich hochgeladen (20)

AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of Terraform
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
 
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingRepurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
 
[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdf[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdf
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
 
MS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectorsMS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectors
 
Ransomware_Q4_2023. The report. [EN].pdf
Ransomware_Q4_2023. The report. [EN].pdfRansomware_Q4_2023. The report. [EN].pdf
Ransomware_Q4_2023. The report. [EN].pdf
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
 
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ..."I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
 
Artificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyArtificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : Uncertainty
 
CNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In PakistanCNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In Pakistan
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
 
Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native Applications
 
FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
 
AXA XL - Insurer Innovation Award Americas 2024
AXA XL - Insurer Innovation Award Americas 2024AXA XL - Insurer Innovation Award Americas 2024
AXA XL - Insurer Innovation Award Americas 2024
 

Automated UI Testing for Web and Native Apps on iOS and Android

  • 1. Automated UI Testing for Web and Native Apps on iOS and Android Operation Mobile
  • 2. What I’ll be covering What are automated UI tests and why should you care? How to test mobile web apps How to test native Android apps Common automation test pitfalls How to pick a test framework The future and how to test native iOS apps Operation Mobile
  • 3. The difference between unit and automation tests Performing actions on a user interface (UI) Automated UI tests are done at a higher level than unit tests Operation Mobile
  • 4. All that matters is the total is what we expect Operation Mobile
  • 5. We will be automating UI tests for a calculator 1. Can add two numbers together Given the user enters 1 and 2 When the user touches calculate Then the total should be 3 2. Can clear the screen Given the user enters 1 and 2 When the user touches clear Then the first number should be blank And the second number should be blank And the total should be 0 Operation Mobile
  • 6. Why do automated UI testing for mobile apps? Design and marketing will get you users But if an app doesn’t function properly Users might give one star ratings and won’t recommend it Operation Mobile
  • 7. Each new function = something else to test iCalc v1 iCalc v2 iCalc v3 iCalc v4  Add  Add  Add  Add  Clear  Clear  Clear  Clear  Subtract  Subtract  Subtract  Multiply  Multiply  Divide Operation Mobile
  • 8. Each new view = somewhere else to test Operation Mobile
  • 9. Will you really remember to test everything? Because you decide to go on holiday for a while... around the world You developed another app You’re human Operation MOBILE
  • 10. But I never changed that bit... Forgot that something else also used that code Made an accidental typo because you’re human Operation Mobile
  • 11. What about if you work in a team? Do you know how to test what each other have done? Operation Mobile
  • 12. Automated UI tests can run on multiple devices Run the same tests for tablet and phone using simulator saving you time Run different tests for tablet and phone using simulator saving you time and remembering what to test on what device Operation Mobile
  • 13. Automated UI tests can target SDKs Run tests for older version for backwards compatibility saving you time Run tests on newer versions to give you a heads up Operation Mobile
  • 14. Automated UI tests vs. QA Never be as good as having a (good) QA But will be cheaper And faster Operation Mobile
  • 15. On the subject of cost automated UI testing is... Every framework I’ll be showing you is open source Operation Mobile
  • 16. Automating UI tests for Web Apps Selenium - http://seleniumhq.org/ Operation Mobile
  • 17. How Selenium works Install and run iWebDriver application onto the device. This runs a webserver which listens for commands... which you send from your computer. Similar to using a remote control. Operation Mobile
  • 18. Automated UI tests for web apps using Selenium Watch this video on YouTube - http://youtu.be/51E3FWMKkig Operation Mobile
  • 19. Same for Android  Follow the instructions here: http://code.google.com/p/selenium/wiki/AndroidDriver  Install an APK instead of an APP  Set up port forwarding Operation Mobile
  • 20. Automated UI tests for native Android apps The good news is... A UI Automation test framework already comes with the Android SDK But we are not going to use it (directly anyway) because... Operation Mobile
  • 21. Robotium is the best way to test Android Apps Robotium http://code.google.com/p/robotium/ Uses the Android test framework and solves a very important issue... Operation Mobile
  • 22. Can deal with tests running faster than UI threads Your UI test can perform actions faster than you can but... that means it will expect something to happen faster the UI finishes its task Robotium is clever enough to wait for things to happen – no sleeps required! Operation Mobile
  • 23. Why use Robotium instead of standard SDK Robotium uses Solo, which allows to simulate gestures Active community to help if you get stuck Gets updated more often than Android SDK Operation Mobile
  • 24. Automating Android native apps using Robotium Watch this video on YouTube - http://youtu.be/XsNxZn7f7Xc Operation Mobile
  • 25. Common pitfalls of automated UI testing Too many unnecessary tests that don’t add value e.g. testing the SDK Fragile tests use position index, hierarchy in layout etc. Too many changes in one go Over reliance on one person – he’s the <insert role> guy Operation Mobile
  • 26. How to pick the right framework Get your hands dirty and try it out Good learning resources Good community support Does it have ‘most’ of the functionality you require? Operation Mobile
  • 27. The future... So far all tests you’ve seen look like they’ve been written by developers... but we’re testing at a higher level than unit tests... because we’re testing behaviour (BDD) So why can’t our tests be written in English? Operation Mobile
  • 28. Calculator tests in English Scenario: Can add two numbers together When I type "1" into "firstNumber“ And I type "2" into "secondNumber" And I touch the "Calculate" button Then the total should be 3 Scenario: Can clear all fields When I type "1" into "firstNumber" And I type "2" into "secondNumber" And I touch the "Clear" button Then the total should be 0 And the "firstNumber" should be empty And the "secondNumber" should be empty Operation Mobile
  • 29. Frank + Cucumber + UISpec makes this possible Frank - https://github.com/moredip/Frank (By Universal Studios (Frankenstein promotional photo) [Public domain], via Wikimedia Commons) Uses Cucumber and UISpec to run scenarios as automated UI tests Cucumber uses Ruby to convert text into code But lots of built in steps for you to use e.g. When I touch <UI Element> Operation Mobile
  • 30. Automated UI tests for iOS native apps with Frank Watch this video on YouTube - http://youtu.be/tvv7kbvNb-8 Operation Mobile
  • 31. Why automate UI tests using scenarios? Perfect match for storyboards (new in iOS 5) And because they can be converted in into Objective C, Java etc... The same scenario could be used test the same app on iOS, Android, Windows, Balckberry etc. Operation Mobile
  • 32. To conclude… Get your hands dirty and try it out Operation Mobile