SlideShare uma empresa Scribd logo
1 de 25
PRESENTATION OVERVIEW


 −   Why to test at all?
 −   Richness of Android devices – a real opportunity
 −   Android success story in numbers
 −   Urban myths about mobile testing
 −   Options for professional grade testing
 −   Typical application implementations pitfalls
 −   Some automated testing frameworks for Android




1
                                 info@bitbar.com
WHY TO TEST AT ALL?

 Beta test approach                                Systematic testing
Pre launch activities: Light manual testing for    Testing criteria: Some level of basic
catching most obvious bugs. Usually done on        acceptance criteria needs to be created: What
one or max 2-3 devices.                            devices are supported, what use cases are
                                                   important, what is the expected performance
Beta phase: App is distributed to 10-100 beta
users who will report bugs and any other issues    Setting up test automation: Test cases are
                                                   converted to test scripts, that are executed
Launch: Based on the feedback from beta            every time when the app changes
testing a new version is created and launched to
the app stores.                                    Testing throughout the development cycle:
                                                   Testing starts when first features are
                                                   implemented and continues even when the app
                                                   is released



2
WHY TO TEST AT ALL?

  Some quotes:
 Summary: Developers need to avoid treating
 end-users as beta testers and conduct pre-
 launch app testing to avoid critical reviews due
 to poor usability once released to market

 “If there is a major bug that is not caught before
 the launch, then a lot of expensive development
 and marketing work is quickly wasted”

 "The first wave of users gives the app bad
 ratings, which then undermine [the number of]
 downloads and the app would [eventually] sink
 into oblivion."



3                              Source: http://www.zdnet.com/mobile-app-testing-imperative-but-not-foolproof-
                                    7000000787/
WHY TO TEST AT ALL?

  2012 Cap Gemini Quality
   Report (Mobile Testing)
 “Mobile design and development fits nicely
 with iterative development. Looping around
 the cycle of requirements, design, build and
 test in smaller chucks means that testing
 need not simply be a cost “tacked-on” to the
 end of a project. There are some types of
 such as penetration and security testing that
 should only be done towards the end of the
 project, but for functionality, performance and
 ease-of-use testing we recommend that
 this be done iteratively during the mobile
 project.”


4                              Source: http://www.capgemini.com/technology-blog/2012/09/quality-report-2012-
                               mobile-testing/
WHY TO TEST AT ALL?

  2012 Cap Gemini Quality
   Report (Mobile Testing)

 “Notable from the survey is that
 18% of responding companies
 say that they do not have enough
 time to test mobile apps, and
 65% do not have the right tools.
 Also 52% cite lack of devices as
 a reason not to do mobile testing”




5                             Source: http://www.capgemini.com/technology-blog/2012/09/quality-report-2012-
                              mobile-testing/
THE RICHNESS OF ANDROID ECOSYSTEM

 Fragmentation is innovation


           Samsung
           Galaxy S2
         < 10% market share




          Graphical representation of fragmentation in the Android ecosystem. Each rectangle represents the market share of one

6
          Android device. Samsung Galaxy S2, the most successful Android to date, has less than 10% market share.


                              Source: Open Signal Maps, May 2012
ANDROID SUCCESS STORY IN NUMBERS


                                                                                  − Over 500m Android
                  Q2/2012    Q2/2012     Q2/2011       Q2/2011                      devices shipped since
       OS        shipments   market     shipments      market        YoY change
                              share                     share                       Android 1.0
                                                                                  − About 220m iOS devices
     Android      104.8      68.1%        50.8          46.9%            106.5%     have been shipped since
                                                                                    2007
       iOS          26       16.9%        20.4          18.8%            27.5%

    Blackberry     7.4       4.8%         12.5          11.5%            -40.9%

    Symbian        6.8       4.4%         18.3          16.9%            -62.9%


    Windows        5.4       3.5%          2.5          2.3%             115.3%



7
                              info@bitbar.com    Source: IDC, 8.8.2012
URBAN MYTHS ABOUT ANDROID TESTING
Myth #1: Testing on emulators is enough

This app works perfectly on
Android 2.3 and 4.0 emulators
but on some of the most
popular devices looks like
this:




8
                           info@bitbar.com
URBAN MYTHS ABOUT ANDROID TESTING
Myth #2: Testing on 5-8 most common devices is
enough

Yes, if reaching every every
fourth Android user is ok for
your CEO:




9
                            info@bitbar.com
URBAN MYTHS ABOUT ANDROID TESTING
Myth #3: Exploratory testing just before launch is
enough
  Exploratory testing is not very good for catching any regressions
  Exploratory testing is not very repeatable
  Exploratory testing (any manual testing) does not scale very well
    However, exploratory testing has its own merits – it is not enough just by itself




10
                               info@bitbar.com
URBAN MYTHS ABOUT ANDROID TESTING
Myth #4: Users will understand if there are some
issues
  Application not working and having bugs is #1 reason for uninstalling the app
  Users don’t update their apps very frequently
  Quality issues are #1 reason for bad reviews in Google Play (about 80%),
   Application content related issues are only (20%)




11
                        info@bitbar.com
TYPICAL APPLICATION IMPLEMENTATION
PITFALLS

 Mix different technologies and frameworks
 Extensive use of web views
     −   Webkits differ from one device to another
     −   All sorts of timeout due to most content coming from server
     −   Issues in http headers across devices
     −   CSS&Javascript cause their own problems
 Use cross platform tools
     − Especially the ones that generate the code on server side are very difficult to debug
     − Wrapping HTML5 to an app is quite ok
     − The time you save on development, you loose on debugging




12
                             info@bitbar.com
HOW TO SET UP A PROFESSIONAL GRADE
TESTING

 Set up Continuous Integration and version control
 Automate most common use cases
     −   Address the basics first
     −   Establish a repeatable baseline
     −   Keep adding new tests as your functionality grows
     −   Do not try to automate everything – there is still time and place for manual checks as well
     −   Maintain your test library as your code evolves (store both in version control)
 Define your target devices:
     − Depending your ambition level anything from 20 to 50 will do.
     − Test automatically and often with these devices
     − To get a reference point run occasionally tests with all possible devices (especially before any
       release)



13
                              info@bitbar.com
TESTDROID PRODUCTS


 Testdroid Cloud                                                  Testdroid Cloud
−   Device cloud for developers to run their tests on 100+ real
    Android devices, in parallel
−   Provides detailed test results and analytics

 Testdroid Private Cloud
−   Private on-premise device cloud for Enterprises to run their
    tests on Android devices in their own development lab
−   Provides detailed test results and analytics

 Testdroid Recorder
−   Developer tool to simplify and accelerate the creation of
    test scripts


14
                                   info@bitbar.com
INTRODUCING TESTDROID APP CRAWLER


 Intelligent systematic app                            See video: http://youtu.be/eYvhyjf7HoY
  exerciser
−   Device cloud for developers to run their tests on
    100+ real Android devices, in parallel
−   Provides detailed test results and analytics

 Visual easy to read results
−   Visual browser for inspecting the crawler's path
    through the app
−   Screenshots, logs and performance info

 Android testing will never be the
  same!
15
                                   info@bitbar.com
TEST AUTOMATION FRAMEWORKS FOR
ANDROID - OVERVIEW

This is an overview of OPEN SOURCE Android testing frameworks – there are tens of
closed proprietary testing tools/frameworks that are not covered here
Selected frameworks:
- Monkey exerciser
- Monkey Runner
- Robotium
- Roboelectric
- Calabash
- Monkey Talk


16
                        info@bitbar.com
AUTOMATION FRAMEWORKS FOR ANDROID -
OVERVIEW

Two main approaches:




     Android Instrumentation Framework    Instrumentation wrapped to the app itself

17
                        info@bitbar.com
AUTOMATION FRAMEWORKS FOR ANDROID –
MONKEY EXERCISER

 What:
     - A UI/Application exerciser monkey for creating stream of random user events such as clicks,
     touches, gestures and some system level events
 Usage:

               $ adb shell monkey -p your.package.name -v 500

 Pros:
     - Useful way to stress test your application to find non-obvious usage patterns and corner cases
 Cons:
     - No way to create any other inputs than clicks which make for instance logging in to an app
     impossible
18
                              info@bitbar.com
AUTOMATION FRAMEWORKS FOR ANDROID –
MONKEY RUNNER

 What:
     - An API toolkit for writing programs that control an Android device or emulator from outside of
     Android code
 Usage:

     device.press('KEYCODE_MENU','DOWN_AND_UP')

 Pros:
     - Only way to create tests that span across application boundaries
 Cons:
     - UI elements can only be clicked with x,y clicks that do not scale => you have to create one script
     for each resolution. There is no validation mechanism for any events created by clicks
19
                               info@bitbar.com
AUTOMATION FRAMEWORKS FOR ANDROID –
ROBOTIUM

 What:
     - It's like Selenium for Android. A JUnit based helper library/framework
 Usage:

     solo.clickOnText("Configuration");
 Pros:
     - Powerful UI, functional and system testing capabilities (because it's based on JUnit)
 Cons:
     - Cannot cross the application boundaries in test scripts (because it is using Android
     Instrumentation Framework)

20
                               info@bitbar.com
AUTOMATION FRAMEWORKS FOR ANDROID –
CALABASH

 What:
     - Cucumber based test automation framework for Android and iOS
 Usage:

     And I select ”Options" from the menu

 Pros:
     - Creating scripts does not require any programming skills, Same scripts work across platforms
Cons:
     - Wraps the application under test with an http server so you will be testing a different binary that
     the one you are going to ship.

21
                                info@bitbar.com
AUTOMATION FRAMEWORKS FOR ANDROID –
MONKEY TALK

 What:
     - Cross platform testing tool/framework for Android and iOS
 Usage:

     Input address Verify “123 Main St.” %timeout=500

 Pros:
     - Same script works for your Android and iOS app (if the apps are identical)
Cons:
     - Uses proprietary scripting language. Requires you to wrap your app with a testing library so you
     will be testing a different binary that the one you are going to ship.

22
                               info@bitbar.com
AUTOMATION FRAMEWORKS FOR ANDROID –
ROBOELECTRIC

 What:
     - Running unit tests on virtual machine – instead of an emulator or real devices
 Usage:

     activity.findViewById(R.id.press_me_button);

 Pros:
     - Ultra fast! Can be run in every code commit
 Cons:
     - It is just for unit testing – it doesn't give you any info on how your app runs on target devices



23
                                info@bitbar.com
FURTHER INFORMATION

 Additional information on web:


     − Company and Products: http://www.bitbar.com
     –   Testdroid Cloud: http://cloud.testdroid.com
     –   Testdroid App Crawler: http://youtu.be/eYvhyjf7HoY

     − Demo video (3min): http://youtu.be/zj11lzUmScg?hd=1




24
                             info@bitbar.com
Mobile Test Automation

Mais conteúdo relacionado

Destaque

ISTQB - CTFL Summary v1.0
ISTQB - CTFL Summary v1.0ISTQB - CTFL Summary v1.0
ISTQB - CTFL Summary v1.0Samer Desouky
 
Software testing
Software testingSoftware testing
Software testingmkn3009
 
Atlassian Roadshow 2016 - DevOps Session
Atlassian Roadshow 2016 - DevOps SessionAtlassian Roadshow 2016 - DevOps Session
Atlassian Roadshow 2016 - DevOps SessionSourcesense
 
Getting Started with Mobile Test Automation & Appium
Getting Started with Mobile Test Automation & AppiumGetting Started with Mobile Test Automation & Appium
Getting Started with Mobile Test Automation & AppiumSauce Labs
 
Automated Testing vs Manual Testing
Automated Testing vs Manual TestingAutomated Testing vs Manual Testing
Automated Testing vs Manual TestingDirecti Group
 
Test Process Improvement with TPI NEXT - what the model does not tell you but...
Test Process Improvement with TPI NEXT - what the model does not tell you but...Test Process Improvement with TPI NEXT - what the model does not tell you but...
Test Process Improvement with TPI NEXT - what the model does not tell you but...SQALab
 
Android & iOS Automation Using Appium
Android & iOS Automation Using AppiumAndroid & iOS Automation Using Appium
Android & iOS Automation Using AppiumMindfire Solutions
 
How Atlassian's Build Engineering Team Has Scaled to 150k Builds Per Month an...
How Atlassian's Build Engineering Team Has Scaled to 150k Builds Per Month an...How Atlassian's Build Engineering Team Has Scaled to 150k Builds Per Month an...
How Atlassian's Build Engineering Team Has Scaled to 150k Builds Per Month an...Peter Leschev
 
Introduction to Test Automation - Technology and Tools
Introduction to Test Automation - Technology and ToolsIntroduction to Test Automation - Technology and Tools
Introduction to Test Automation - Technology and ToolsKMS Technology
 
Introduction to Test Automation
Introduction to Test AutomationIntroduction to Test Automation
Introduction to Test AutomationPekka Klärck
 
Tipos de pruebas de software
Tipos de pruebas de softwareTipos de pruebas de software
Tipos de pruebas de softwareGuillermo Lemus
 
Automated vs manual testing
Automated vs manual testingAutomated vs manual testing
Automated vs manual testingKanoah
 

Destaque (19)

ISTQB - CTFL Summary v1.0
ISTQB - CTFL Summary v1.0ISTQB - CTFL Summary v1.0
ISTQB - CTFL Summary v1.0
 
Appium
AppiumAppium
Appium
 
Software testing
Software testingSoftware testing
Software testing
 
From QA To Dev-QA-Ops
From QA To Dev-QA-OpsFrom QA To Dev-QA-Ops
From QA To Dev-QA-Ops
 
Atlassian Roadshow 2016 - DevOps Session
Atlassian Roadshow 2016 - DevOps SessionAtlassian Roadshow 2016 - DevOps Session
Atlassian Roadshow 2016 - DevOps Session
 
Getting Started with Mobile Test Automation & Appium
Getting Started with Mobile Test Automation & AppiumGetting Started with Mobile Test Automation & Appium
Getting Started with Mobile Test Automation & Appium
 
Automated Testing vs Manual Testing
Automated Testing vs Manual TestingAutomated Testing vs Manual Testing
Automated Testing vs Manual Testing
 
Test Process Improvement with TPI NEXT - what the model does not tell you but...
Test Process Improvement with TPI NEXT - what the model does not tell you but...Test Process Improvement with TPI NEXT - what the model does not tell you but...
Test Process Improvement with TPI NEXT - what the model does not tell you but...
 
Testing - Ing. Gabriela Muñoz
Testing - Ing. Gabriela MuñozTesting - Ing. Gabriela Muñoz
Testing - Ing. Gabriela Muñoz
 
Android & iOS Automation Using Appium
Android & iOS Automation Using AppiumAndroid & iOS Automation Using Appium
Android & iOS Automation Using Appium
 
How Atlassian's Build Engineering Team Has Scaled to 150k Builds Per Month an...
How Atlassian's Build Engineering Team Has Scaled to 150k Builds Per Month an...How Atlassian's Build Engineering Team Has Scaled to 150k Builds Per Month an...
How Atlassian's Build Engineering Team Has Scaled to 150k Builds Per Month an...
 
Introduction to Test Automation - Technology and Tools
Introduction to Test Automation - Technology and ToolsIntroduction to Test Automation - Technology and Tools
Introduction to Test Automation - Technology and Tools
 
10 Benefits of Automated Testing
10 Benefits of Automated Testing10 Benefits of Automated Testing
10 Benefits of Automated Testing
 
Introduction to Test Automation
Introduction to Test AutomationIntroduction to Test Automation
Introduction to Test Automation
 
Introducing DevOps
Introducing DevOpsIntroducing DevOps
Introducing DevOps
 
Tipos de pruebas de software
Tipos de pruebas de softwareTipos de pruebas de software
Tipos de pruebas de software
 
Automated vs manual testing
Automated vs manual testingAutomated vs manual testing
Automated vs manual testing
 
Automated Testing
Automated TestingAutomated Testing
Automated Testing
 
Digital in 2017 Global Overview
Digital in 2017 Global OverviewDigital in 2017 Global Overview
Digital in 2017 Global Overview
 

Mais de Bitbar

The Best of Both Worlds - Combining Performance and Functional Mobile App Tes...
The Best of Both Worlds - Combining Performance and Functional Mobile App Tes...The Best of Both Worlds - Combining Performance and Functional Mobile App Tes...
The Best of Both Worlds - Combining Performance and Functional Mobile App Tes...Bitbar
 
Mobile performance metrics and performance monitoring meetup 2017 05 10
Mobile performance metrics and performance monitoring meetup 2017 05 10Mobile performance metrics and performance monitoring meetup 2017 05 10
Mobile performance metrics and performance monitoring meetup 2017 05 10Bitbar
 
Exercising and Scaling Up Mobile DevOps in the Enterprise
Exercising and Scaling Up Mobile DevOps in the EnterpriseExercising and Scaling Up Mobile DevOps in the Enterprise
Exercising and Scaling Up Mobile DevOps in the EnterpriseBitbar
 
Getting Started with XCTest and XCUITest for iOS App Testing
Getting Started with XCTest and XCUITest for iOS App TestingGetting Started with XCTest and XCUITest for iOS App Testing
Getting Started with XCTest and XCUITest for iOS App TestingBitbar
 
Hassle-Free Continuous Integration with Real Device Testing
Hassle-Free Continuous Integration with Real Device TestingHassle-Free Continuous Integration with Real Device Testing
Hassle-Free Continuous Integration with Real Device TestingBitbar
 
Best Practices for DevOps in Mobile App Testing
Best Practices for DevOps in Mobile App TestingBest Practices for DevOps in Mobile App Testing
Best Practices for DevOps in Mobile App TestingBitbar
 
Ensure Your Mobile Channels Generate Revenue on Holiday Peak Days
Ensure Your Mobile Channels Generate Revenue on Holiday Peak DaysEnsure Your Mobile Channels Generate Revenue on Holiday Peak Days
Ensure Your Mobile Channels Generate Revenue on Holiday Peak DaysBitbar
 
How to Reliably Measure and Optimize Graphics Performance of Your Android Games
How to Reliably Measure and Optimize Graphics Performance of Your Android GamesHow to Reliably Measure and Optimize Graphics Performance of Your Android Games
How to Reliably Measure and Optimize Graphics Performance of Your Android GamesBitbar
 
Parallel Test Runs with Appium on Real Mobile Devices – Hands-on Webinar
Parallel Test Runs with Appium on Real Mobile Devices – Hands-on WebinarParallel Test Runs with Appium on Real Mobile Devices – Hands-on Webinar
Parallel Test Runs with Appium on Real Mobile Devices – Hands-on WebinarBitbar
 
LDNSE: Testdroid for Mobile App and Web Testing (London Selenium Meetup)
LDNSE: Testdroid for Mobile App and Web Testing (London Selenium Meetup)LDNSE: Testdroid for Mobile App and Web Testing (London Selenium Meetup)
LDNSE: Testdroid for Mobile App and Web Testing (London Selenium Meetup)Bitbar
 
The Powerful and Comprehensive API for Mobile App Development and Testing
The Powerful and Comprehensive API for Mobile App Development and TestingThe Powerful and Comprehensive API for Mobile App Development and Testing
The Powerful and Comprehensive API for Mobile App Development and TestingBitbar
 
Which One Works You The Best: In-House or Cloud-Based Development Environment
Which One Works You The Best: In-House or Cloud-Based Development EnvironmentWhich One Works You The Best: In-House or Cloud-Based Development Environment
Which One Works You The Best: In-House or Cloud-Based Development EnvironmentBitbar
 
Best Practices in Mobile Game Testing
Best Practices in Mobile Game TestingBest Practices in Mobile Game Testing
Best Practices in Mobile Game TestingBitbar
 
Build a Large Scale In-House Test Lab for Mobile Apps
Build a Large Scale In-House Test Lab for Mobile AppsBuild a Large Scale In-House Test Lab for Mobile Apps
Build a Large Scale In-House Test Lab for Mobile AppsBitbar
 
The Status of Android Hardware and Software - From App Developer's Point of View
The Status of Android Hardware and Software - From App Developer's Point of ViewThe Status of Android Hardware and Software - From App Developer's Point of View
The Status of Android Hardware and Software - From App Developer's Point of ViewBitbar
 
Do You Enjoy Espresso in Android App Testing?
Do You Enjoy Espresso in Android App Testing?Do You Enjoy Espresso in Android App Testing?
Do You Enjoy Espresso in Android App Testing?Bitbar
 
Testing Your Android and iOS Apps with Appium in Testdroid Cloud
Testing Your Android and iOS Apps with Appium in Testdroid CloudTesting Your Android and iOS Apps with Appium in Testdroid Cloud
Testing Your Android and iOS Apps with Appium in Testdroid CloudBitbar
 
How to Leverage Appium in Your Mobile App Testing
How to Leverage Appium in Your Mobile App TestingHow to Leverage Appium in Your Mobile App Testing
How to Leverage Appium in Your Mobile App TestingBitbar
 
How to Test Security and Vulnerability of Your Android and iOS Apps
How to Test Security and Vulnerability of Your Android and iOS AppsHow to Test Security and Vulnerability of Your Android and iOS Apps
How to Test Security and Vulnerability of Your Android and iOS AppsBitbar
 
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
 

Mais de Bitbar (20)

The Best of Both Worlds - Combining Performance and Functional Mobile App Tes...
The Best of Both Worlds - Combining Performance and Functional Mobile App Tes...The Best of Both Worlds - Combining Performance and Functional Mobile App Tes...
The Best of Both Worlds - Combining Performance and Functional Mobile App Tes...
 
Mobile performance metrics and performance monitoring meetup 2017 05 10
Mobile performance metrics and performance monitoring meetup 2017 05 10Mobile performance metrics and performance monitoring meetup 2017 05 10
Mobile performance metrics and performance monitoring meetup 2017 05 10
 
Exercising and Scaling Up Mobile DevOps in the Enterprise
Exercising and Scaling Up Mobile DevOps in the EnterpriseExercising and Scaling Up Mobile DevOps in the Enterprise
Exercising and Scaling Up Mobile DevOps in the Enterprise
 
Getting Started with XCTest and XCUITest for iOS App Testing
Getting Started with XCTest and XCUITest for iOS App TestingGetting Started with XCTest and XCUITest for iOS App Testing
Getting Started with XCTest and XCUITest for iOS App Testing
 
Hassle-Free Continuous Integration with Real Device Testing
Hassle-Free Continuous Integration with Real Device TestingHassle-Free Continuous Integration with Real Device Testing
Hassle-Free Continuous Integration with Real Device Testing
 
Best Practices for DevOps in Mobile App Testing
Best Practices for DevOps in Mobile App TestingBest Practices for DevOps in Mobile App Testing
Best Practices for DevOps in Mobile App Testing
 
Ensure Your Mobile Channels Generate Revenue on Holiday Peak Days
Ensure Your Mobile Channels Generate Revenue on Holiday Peak DaysEnsure Your Mobile Channels Generate Revenue on Holiday Peak Days
Ensure Your Mobile Channels Generate Revenue on Holiday Peak Days
 
How to Reliably Measure and Optimize Graphics Performance of Your Android Games
How to Reliably Measure and Optimize Graphics Performance of Your Android GamesHow to Reliably Measure and Optimize Graphics Performance of Your Android Games
How to Reliably Measure and Optimize Graphics Performance of Your Android Games
 
Parallel Test Runs with Appium on Real Mobile Devices – Hands-on Webinar
Parallel Test Runs with Appium on Real Mobile Devices – Hands-on WebinarParallel Test Runs with Appium on Real Mobile Devices – Hands-on Webinar
Parallel Test Runs with Appium on Real Mobile Devices – Hands-on Webinar
 
LDNSE: Testdroid for Mobile App and Web Testing (London Selenium Meetup)
LDNSE: Testdroid for Mobile App and Web Testing (London Selenium Meetup)LDNSE: Testdroid for Mobile App and Web Testing (London Selenium Meetup)
LDNSE: Testdroid for Mobile App and Web Testing (London Selenium Meetup)
 
The Powerful and Comprehensive API for Mobile App Development and Testing
The Powerful and Comprehensive API for Mobile App Development and TestingThe Powerful and Comprehensive API for Mobile App Development and Testing
The Powerful and Comprehensive API for Mobile App Development and Testing
 
Which One Works You The Best: In-House or Cloud-Based Development Environment
Which One Works You The Best: In-House or Cloud-Based Development EnvironmentWhich One Works You The Best: In-House or Cloud-Based Development Environment
Which One Works You The Best: In-House or Cloud-Based Development Environment
 
Best Practices in Mobile Game Testing
Best Practices in Mobile Game TestingBest Practices in Mobile Game Testing
Best Practices in Mobile Game Testing
 
Build a Large Scale In-House Test Lab for Mobile Apps
Build a Large Scale In-House Test Lab for Mobile AppsBuild a Large Scale In-House Test Lab for Mobile Apps
Build a Large Scale In-House Test Lab for Mobile Apps
 
The Status of Android Hardware and Software - From App Developer's Point of View
The Status of Android Hardware and Software - From App Developer's Point of ViewThe Status of Android Hardware and Software - From App Developer's Point of View
The Status of Android Hardware and Software - From App Developer's Point of View
 
Do You Enjoy Espresso in Android App Testing?
Do You Enjoy Espresso in Android App Testing?Do You Enjoy Espresso in Android App Testing?
Do You Enjoy Espresso in Android App Testing?
 
Testing Your Android and iOS Apps with Appium in Testdroid Cloud
Testing Your Android and iOS Apps with Appium in Testdroid CloudTesting Your Android and iOS Apps with Appium in Testdroid Cloud
Testing Your Android and iOS Apps with Appium in Testdroid Cloud
 
How to Leverage Appium in Your Mobile App Testing
How to Leverage Appium in Your Mobile App TestingHow to Leverage Appium in Your Mobile App Testing
How to Leverage Appium in Your Mobile App Testing
 
How to Test Security and Vulnerability of Your Android and iOS Apps
How to Test Security and Vulnerability of Your Android and iOS AppsHow to Test Security and Vulnerability of Your Android and iOS Apps
How to Test Security and Vulnerability of Your Android and iOS Apps
 
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?
 

Mobile Test Automation

  • 1. PRESENTATION OVERVIEW − Why to test at all? − Richness of Android devices – a real opportunity − Android success story in numbers − Urban myths about mobile testing − Options for professional grade testing − Typical application implementations pitfalls − Some automated testing frameworks for Android 1 info@bitbar.com
  • 2. WHY TO TEST AT ALL?  Beta test approach  Systematic testing Pre launch activities: Light manual testing for Testing criteria: Some level of basic catching most obvious bugs. Usually done on acceptance criteria needs to be created: What one or max 2-3 devices. devices are supported, what use cases are important, what is the expected performance Beta phase: App is distributed to 10-100 beta users who will report bugs and any other issues Setting up test automation: Test cases are converted to test scripts, that are executed Launch: Based on the feedback from beta every time when the app changes testing a new version is created and launched to the app stores. Testing throughout the development cycle: Testing starts when first features are implemented and continues even when the app is released 2
  • 3. WHY TO TEST AT ALL?  Some quotes: Summary: Developers need to avoid treating end-users as beta testers and conduct pre- launch app testing to avoid critical reviews due to poor usability once released to market “If there is a major bug that is not caught before the launch, then a lot of expensive development and marketing work is quickly wasted” "The first wave of users gives the app bad ratings, which then undermine [the number of] downloads and the app would [eventually] sink into oblivion." 3 Source: http://www.zdnet.com/mobile-app-testing-imperative-but-not-foolproof- 7000000787/
  • 4. WHY TO TEST AT ALL?  2012 Cap Gemini Quality Report (Mobile Testing) “Mobile design and development fits nicely with iterative development. Looping around the cycle of requirements, design, build and test in smaller chucks means that testing need not simply be a cost “tacked-on” to the end of a project. There are some types of such as penetration and security testing that should only be done towards the end of the project, but for functionality, performance and ease-of-use testing we recommend that this be done iteratively during the mobile project.” 4 Source: http://www.capgemini.com/technology-blog/2012/09/quality-report-2012- mobile-testing/
  • 5. WHY TO TEST AT ALL?  2012 Cap Gemini Quality Report (Mobile Testing) “Notable from the survey is that 18% of responding companies say that they do not have enough time to test mobile apps, and 65% do not have the right tools. Also 52% cite lack of devices as a reason not to do mobile testing” 5 Source: http://www.capgemini.com/technology-blog/2012/09/quality-report-2012- mobile-testing/
  • 6. THE RICHNESS OF ANDROID ECOSYSTEM  Fragmentation is innovation Samsung Galaxy S2 < 10% market share Graphical representation of fragmentation in the Android ecosystem. Each rectangle represents the market share of one 6 Android device. Samsung Galaxy S2, the most successful Android to date, has less than 10% market share. Source: Open Signal Maps, May 2012
  • 7. ANDROID SUCCESS STORY IN NUMBERS − Over 500m Android Q2/2012 Q2/2012 Q2/2011 Q2/2011 devices shipped since OS shipments market shipments market YoY change share share Android 1.0 − About 220m iOS devices Android 104.8 68.1% 50.8 46.9% 106.5% have been shipped since 2007 iOS 26 16.9% 20.4 18.8% 27.5% Blackberry 7.4 4.8% 12.5 11.5% -40.9% Symbian 6.8 4.4% 18.3 16.9% -62.9% Windows 5.4 3.5% 2.5 2.3% 115.3% 7 info@bitbar.com Source: IDC, 8.8.2012
  • 8. URBAN MYTHS ABOUT ANDROID TESTING Myth #1: Testing on emulators is enough This app works perfectly on Android 2.3 and 4.0 emulators but on some of the most popular devices looks like this: 8 info@bitbar.com
  • 9. URBAN MYTHS ABOUT ANDROID TESTING Myth #2: Testing on 5-8 most common devices is enough Yes, if reaching every every fourth Android user is ok for your CEO: 9 info@bitbar.com
  • 10. URBAN MYTHS ABOUT ANDROID TESTING Myth #3: Exploratory testing just before launch is enough  Exploratory testing is not very good for catching any regressions  Exploratory testing is not very repeatable  Exploratory testing (any manual testing) does not scale very well  However, exploratory testing has its own merits – it is not enough just by itself 10 info@bitbar.com
  • 11. URBAN MYTHS ABOUT ANDROID TESTING Myth #4: Users will understand if there are some issues  Application not working and having bugs is #1 reason for uninstalling the app  Users don’t update their apps very frequently  Quality issues are #1 reason for bad reviews in Google Play (about 80%), Application content related issues are only (20%) 11 info@bitbar.com
  • 12. TYPICAL APPLICATION IMPLEMENTATION PITFALLS  Mix different technologies and frameworks  Extensive use of web views − Webkits differ from one device to another − All sorts of timeout due to most content coming from server − Issues in http headers across devices − CSS&Javascript cause their own problems  Use cross platform tools − Especially the ones that generate the code on server side are very difficult to debug − Wrapping HTML5 to an app is quite ok − The time you save on development, you loose on debugging 12 info@bitbar.com
  • 13. HOW TO SET UP A PROFESSIONAL GRADE TESTING  Set up Continuous Integration and version control  Automate most common use cases − Address the basics first − Establish a repeatable baseline − Keep adding new tests as your functionality grows − Do not try to automate everything – there is still time and place for manual checks as well − Maintain your test library as your code evolves (store both in version control)  Define your target devices: − Depending your ambition level anything from 20 to 50 will do. − Test automatically and often with these devices − To get a reference point run occasionally tests with all possible devices (especially before any release) 13 info@bitbar.com
  • 14. TESTDROID PRODUCTS  Testdroid Cloud Testdroid Cloud − Device cloud for developers to run their tests on 100+ real Android devices, in parallel − Provides detailed test results and analytics  Testdroid Private Cloud − Private on-premise device cloud for Enterprises to run their tests on Android devices in their own development lab − Provides detailed test results and analytics  Testdroid Recorder − Developer tool to simplify and accelerate the creation of test scripts 14 info@bitbar.com
  • 15. INTRODUCING TESTDROID APP CRAWLER  Intelligent systematic app See video: http://youtu.be/eYvhyjf7HoY exerciser − Device cloud for developers to run their tests on 100+ real Android devices, in parallel − Provides detailed test results and analytics  Visual easy to read results − Visual browser for inspecting the crawler's path through the app − Screenshots, logs and performance info  Android testing will never be the same! 15 info@bitbar.com
  • 16. TEST AUTOMATION FRAMEWORKS FOR ANDROID - OVERVIEW This is an overview of OPEN SOURCE Android testing frameworks – there are tens of closed proprietary testing tools/frameworks that are not covered here Selected frameworks: - Monkey exerciser - Monkey Runner - Robotium - Roboelectric - Calabash - Monkey Talk 16 info@bitbar.com
  • 17. AUTOMATION FRAMEWORKS FOR ANDROID - OVERVIEW Two main approaches: Android Instrumentation Framework Instrumentation wrapped to the app itself 17 info@bitbar.com
  • 18. AUTOMATION FRAMEWORKS FOR ANDROID – MONKEY EXERCISER  What: - A UI/Application exerciser monkey for creating stream of random user events such as clicks, touches, gestures and some system level events  Usage: $ adb shell monkey -p your.package.name -v 500  Pros: - Useful way to stress test your application to find non-obvious usage patterns and corner cases  Cons: - No way to create any other inputs than clicks which make for instance logging in to an app impossible 18 info@bitbar.com
  • 19. AUTOMATION FRAMEWORKS FOR ANDROID – MONKEY RUNNER  What: - An API toolkit for writing programs that control an Android device or emulator from outside of Android code  Usage: device.press('KEYCODE_MENU','DOWN_AND_UP')  Pros: - Only way to create tests that span across application boundaries  Cons: - UI elements can only be clicked with x,y clicks that do not scale => you have to create one script for each resolution. There is no validation mechanism for any events created by clicks 19 info@bitbar.com
  • 20. AUTOMATION FRAMEWORKS FOR ANDROID – ROBOTIUM  What: - It's like Selenium for Android. A JUnit based helper library/framework  Usage: solo.clickOnText("Configuration");  Pros: - Powerful UI, functional and system testing capabilities (because it's based on JUnit)  Cons: - Cannot cross the application boundaries in test scripts (because it is using Android Instrumentation Framework) 20 info@bitbar.com
  • 21. AUTOMATION FRAMEWORKS FOR ANDROID – CALABASH  What: - Cucumber based test automation framework for Android and iOS  Usage: And I select ”Options" from the menu  Pros: - Creating scripts does not require any programming skills, Same scripts work across platforms Cons: - Wraps the application under test with an http server so you will be testing a different binary that the one you are going to ship. 21 info@bitbar.com
  • 22. AUTOMATION FRAMEWORKS FOR ANDROID – MONKEY TALK  What: - Cross platform testing tool/framework for Android and iOS  Usage: Input address Verify “123 Main St.” %timeout=500  Pros: - Same script works for your Android and iOS app (if the apps are identical) Cons: - Uses proprietary scripting language. Requires you to wrap your app with a testing library so you will be testing a different binary that the one you are going to ship. 22 info@bitbar.com
  • 23. AUTOMATION FRAMEWORKS FOR ANDROID – ROBOELECTRIC  What: - Running unit tests on virtual machine – instead of an emulator or real devices  Usage: activity.findViewById(R.id.press_me_button);  Pros: - Ultra fast! Can be run in every code commit  Cons: - It is just for unit testing – it doesn't give you any info on how your app runs on target devices 23 info@bitbar.com
  • 24. FURTHER INFORMATION  Additional information on web: − Company and Products: http://www.bitbar.com – Testdroid Cloud: http://cloud.testdroid.com – Testdroid App Crawler: http://youtu.be/eYvhyjf7HoY − Demo video (3min): http://youtu.be/zj11lzUmScg?hd=1 24 info@bitbar.com

Notas do Editor

  1. 12/09/09
  2. 12/09/09
  3. 12/09/09
  4. 12/09/09
  5. 12/09/09
  6. 12/09/09
  7. 12/09/09
  8. 12/09/09
  9. 12/09/09
  10. 12/09/09
  11. 12/09/09
  12. 12/09/09
  13. 12/09/09
  14. 12/09/09
  15. 12/09/09
  16. 12/09/09
  17. 12/09/09
  18. 12/09/09
  19. 12/09/09
  20. 12/09/09
  21. 12/09/09
  22. 12/09/09
  23. 12/09/09
  24. 12/09/09
  25. 12/09/09 12/09/09 12/09/09 12/09/09 12/09/09 12/09/09 12/09/09 12/09/09 12/09/09 12/09/09 12/09/09 12/09/09