SlideShare a Scribd company logo
1 of 10
Download to read offline
A Toolset for GUI Testing of
   Android Applications

                 Domenico Amalfitano
                   Anna Rita Fasolino
                  Porfirio Tramontana
                 Salvatore De Carmine
                   Gennaro Imparato
             Dipartimento di Informatica e Sistemistica
                University of Naples Federico II, Italy
Context and Motivation
Android OS is currently the most diffused platform for
mobile devices [Gartner, 2012 August]
   – 98 Millions of Mobile Device sales with Android OS in second quarter
     2012
   – Android owns 64% of Market Share
Google Play market now includes over than 500,000 apps
   – Most of these apps have been developed by small
     programmer teams, by evolutionary life cycles
     with very frequent releases via Google Play

There is a strong need for fast and effective Testing
automation solutions
                                                                        2
Current Technologies and Tools for
            Android Testing
Testing Frameworks for Unit and GUI testing
   – Robotium, MonkeyRunner, Calculon, Roboelectric, …
Stress testing Tools such as Monkey
Testing tools from research projects:
   – TEMA model-based testing tools [Harty], …
Debugging tools
   – DDMS debugging tool from the Android SDK
Monitoring tools
   – platforms for monitoring app usages and reporting
     app crashes to the developers (like Crittericism)   4
Our Proposal: A toolset for automatic
     GUI Testing of Android apps
• GUI testing is an effective approach for testing an
  app through its GUI, firing sequences of events
  and providing it with user inputs

• The proposed GUI testing toolset is based on a
  configurable GUI Ripper (Android Ripper) that:
   – automatically traverses the GUI firing sequences of
     events through the UI or the device (device rotation,
     press back button, etc.)
   – implements a Black-Box testing approach
   – obtains automatically JUnit test cases (usable for
     regression testing)
                                                             5
Android Ripper Features
The Ripper automatically explores the GUI structure
and returns a GUI Tree model
  • It can be configured in order to emulate several
    kinds of user behaviours, choosing:
     • types of event to be fired, input values, time delays
       between events, GUI traversing strategy (e.g. depth
       first, breadth first, etc.), termination criterion to stop
       GUI traversal ...
  • It detects runtime crashes (due to unhandled Java
    exceptions) and returns the sequences of events
    causing them
An example
             ≡                                            of GUI
    Rotate               ≡                                Ripping
                                                        Click Pages
             Click
                        Click Refresh   Press Menu
             New Post




                                                …

                                            Click Add
                                                              Click About
                                            Account
       Click Save



             …                                                                Crash
                                                                      Click
                                                                      Edit
                                                                                  7

…                                       …
Android Ripper Technological
                 Details
The Ripper is implemented as an                      Android
    Android JUnit Test Project.                  Instrumentation Application
                                                                 Under Test
It exploits the Robotium                              Robotium
                                                                               Storage
    framework and Android
    Instrumentation classes to        Robot   JUnit       Extractor   Persistence
                                                                       Manager
    interact with the Application                 Abstractor
    Under Test (AUT)                                                       Comparator
                                 Scheduler
The AUT source code can be
    instrumented with EMMA to                  Engine                    Strategy
    calculate the code covered by
    the Ripper.                                       Planner


The Saving SnapShot feature
    offers a mechanism to define
    the preconditions of the AUT
Toolset and Testing procedure

The testing procedure executing the Android
  Ripper is performed automatically using a set
  of batch and jar files.
Experiments
We tested some open source apps from Google
 Play market using Android Ripper, finding
 several unknown bugs (reported to the
 developers)
 A. U. T.        #        Ripping   # Bugs   # Crashes   % LOC
                 Events   Time                           Coverage
                          (hours)
 BookCatalogue   1,677       61         2        9          57


 AarDdict          93        2.2        1        5          70
 Tomdroid          86        1.25       1       13          39
 Wordpress        486        6.16       6       31          43
Future Works
• We plan to extend the Ripper :
  • By implementing new event firing strategies
  • By considering new sources of events (sensors)
    and new input selection strategies.

• We will address the technological issues affecting the
  Ripper execution on real devices.


• We will be pleased to further explain the
  toolset usage in the Tool Bazar !

More Related Content

What's hot

Software Testing - Sajid Sidi
Software Testing - Sajid SidiSoftware Testing - Sajid Sidi
Software Testing - Sajid Sidi
Sajid Sidi
 
How to Learn The History of Software Testing
How to Learn The History of Software Testing How to Learn The History of Software Testing
How to Learn The History of Software Testing
Keizo Tatsumi
 
Automated GUI-Testing of Android Apps: From Research to Practice
Automated GUI-Testing of Android Apps: From Research to PracticeAutomated GUI-Testing of Android Apps: From Research to Practice
Automated GUI-Testing of Android Apps: From Research to Practice
Kevin Moran
 

What's hot (12)

Software Testing - Sajid Sidi
Software Testing - Sajid SidiSoftware Testing - Sajid Sidi
Software Testing - Sajid Sidi
 
How to Learn The History of Software Testing
How to Learn The History of Software Testing How to Learn The History of Software Testing
How to Learn The History of Software Testing
 
The History of Software Testing
The History of Software TestingThe History of Software Testing
The History of Software Testing
 
A GUI Crawling-based Technique for Android Mobile Application Testing
A GUI Crawling-based Technique for Android Mobile Application TestingA GUI Crawling-based Technique for Android Mobile Application Testing
A GUI Crawling-based Technique for Android Mobile Application Testing
 
A distinct approach for xmotif application gui test automation
A distinct approach for xmotif application gui test automationA distinct approach for xmotif application gui test automation
A distinct approach for xmotif application gui test automation
 
Dagger for android
Dagger for androidDagger for android
Dagger for android
 
Unit Testing Using Mockito in Android (1).pdf
Unit Testing Using Mockito in Android (1).pdfUnit Testing Using Mockito in Android (1).pdf
Unit Testing Using Mockito in Android (1).pdf
 
ICSE17 - Tool Demonstration - CrashScope A Practical Tool for the Automated T...
ICSE17 - Tool Demonstration - CrashScope A Practical Tool for the Automated T...ICSE17 - Tool Demonstration - CrashScope A Practical Tool for the Automated T...
ICSE17 - Tool Demonstration - CrashScope A Practical Tool for the Automated T...
 
Android automation tools
Android automation toolsAndroid automation tools
Android automation tools
 
ICSE17Tech Briefing - Automated GUI Testing of Android Apps: From Research to...
ICSE17Tech Briefing - Automated GUI Testing of Android Apps: From Research to...ICSE17Tech Briefing - Automated GUI Testing of Android Apps: From Research to...
ICSE17Tech Briefing - Automated GUI Testing of Android Apps: From Research to...
 
Automated GUI-Testing of Android Apps: From Research to Practice
Automated GUI-Testing of Android Apps: From Research to PracticeAutomated GUI-Testing of Android Apps: From Research to Practice
Automated GUI-Testing of Android Apps: From Research to Practice
 
Android testing part i
Android testing part iAndroid testing part i
Android testing part i
 

Similar to A Toolset for GUI Testing of Android Applications

2012 java one-con3648
2012 java one-con36482012 java one-con3648
2012 java one-con3648
Eing Ong
 
Александр Качур - "Android и MeeGo: автоматизация тестовых сценариев"
Александр Качур - "Android и MeeGo: автоматизация тестовых сценариев"Александр Качур - "Android и MeeGo: автоматизация тестовых сценариев"
Александр Качур - "Android и MeeGo: автоматизация тестовых сценариев"
QA Dnepropetrovsk Community (Ukraine)
 
Eclispe daytoulouse combining the power of eclipse with android_fr_1024_768_s...
Eclispe daytoulouse combining the power of eclipse with android_fr_1024_768_s...Eclispe daytoulouse combining the power of eclipse with android_fr_1024_768_s...
Eclispe daytoulouse combining the power of eclipse with android_fr_1024_768_s...
Mathias Seguy
 
OWF12/PAUG Conf Days Android tools for developpeurs, paul marois, design and ...
OWF12/PAUG Conf Days Android tools for developpeurs, paul marois, design and ...OWF12/PAUG Conf Days Android tools for developpeurs, paul marois, design and ...
OWF12/PAUG Conf Days Android tools for developpeurs, paul marois, design and ...
Paris Open Source Summit
 
Android. behind the scenes_programatica 2012
Android. behind the scenes_programatica 2012Android. behind the scenes_programatica 2012
Android. behind the scenes_programatica 2012
Agora Group
 
Alexandre Iline Rit 2010 Java Fxui
Alexandre Iline Rit 2010 Java FxuiAlexandre Iline Rit 2010 Java Fxui
Alexandre Iline Rit 2010 Java Fxui
guest092df8
 

Similar to A Toolset for GUI Testing of Android Applications (20)

Fight back android fragmentation
Fight back android fragmentationFight back android fragmentation
Fight back android fragmentation
 
2012 java one-con3648
2012 java one-con36482012 java one-con3648
2012 java one-con3648
 
Александр Качур - "Android и MeeGo: автоматизация тестовых сценариев"
Александр Качур - "Android и MeeGo: автоматизация тестовых сценариев"Александр Качур - "Android и MeeGo: автоматизация тестовых сценариев"
Александр Качур - "Android и MeeGo: автоматизация тестовых сценариев"
 
Andriod dev toolbox part 2
Andriod dev toolbox  part 2Andriod dev toolbox  part 2
Andriod dev toolbox part 2
 
Using Robots for App Testing
Using Robots for App Testing Using Robots for App Testing
Using Robots for App Testing
 
Eclispe daytoulouse combining the power of eclipse with android_fr_1024_768_s...
Eclispe daytoulouse combining the power of eclipse with android_fr_1024_768_s...Eclispe daytoulouse combining the power of eclipse with android_fr_1024_768_s...
Eclispe daytoulouse combining the power of eclipse with android_fr_1024_768_s...
 
Agile Development in Aerospace and Defense
Agile Development in Aerospace and DefenseAgile Development in Aerospace and Defense
Agile Development in Aerospace and Defense
 
OWF12/PAUG Conf Days Android tools for developpeurs, paul marois, design and ...
OWF12/PAUG Conf Days Android tools for developpeurs, paul marois, design and ...OWF12/PAUG Conf Days Android tools for developpeurs, paul marois, design and ...
OWF12/PAUG Conf Days Android tools for developpeurs, paul marois, design and ...
 
Attacking Proprietary Android Vendor Customizations
Attacking Proprietary Android Vendor CustomizationsAttacking Proprietary Android Vendor Customizations
Attacking Proprietary Android Vendor Customizations
 
Android. behind the scenes_programatica 2012
Android. behind the scenes_programatica 2012Android. behind the scenes_programatica 2012
Android. behind the scenes_programatica 2012
 
Debug, Analyze and Optimize Games with Intel Tools
Debug, Analyze and Optimize Games with Intel Tools Debug, Analyze and Optimize Games with Intel Tools
Debug, Analyze and Optimize Games with Intel Tools
 
Debug, Analyze and Optimize Games with Intel Tools - Matteo Valoriani - Codem...
Debug, Analyze and Optimize Games with Intel Tools - Matteo Valoriani - Codem...Debug, Analyze and Optimize Games with Intel Tools - Matteo Valoriani - Codem...
Debug, Analyze and Optimize Games with Intel Tools - Matteo Valoriani - Codem...
 
Debug, Analyze and Optimize Games with Intel Tools - Matteo Valoriani - Codem...
Debug, Analyze and Optimize Games with Intel Tools - Matteo Valoriani - Codem...Debug, Analyze and Optimize Games with Intel Tools - Matteo Valoriani - Codem...
Debug, Analyze and Optimize Games with Intel Tools - Matteo Valoriani - Codem...
 
Alexandre Iline Rit 2010 Java Fxui
Alexandre Iline Rit 2010 Java FxuiAlexandre Iline Rit 2010 Java Fxui
Alexandre Iline Rit 2010 Java Fxui
 
Automated Generation, Evolution and Maintenance: a perspective for mobile GUI...
Automated Generation, Evolution and Maintenance: a perspective for mobile GUI...Automated Generation, Evolution and Maintenance: a perspective for mobile GUI...
Automated Generation, Evolution and Maintenance: a perspective for mobile GUI...
 
Debugging a .NET program after crash (Post-mortem debugging)
Debugging a .NET program after crash (Post-mortem debugging)Debugging a .NET program after crash (Post-mortem debugging)
Debugging a .NET program after crash (Post-mortem debugging)
 
Android Programming Basics
Android Programming BasicsAndroid Programming Basics
Android Programming Basics
 
Android 3.1 - Portland Code Camp 2011
Android 3.1 - Portland Code Camp 2011Android 3.1 - Portland Code Camp 2011
Android 3.1 - Portland Code Camp 2011
 
mohit anand
 mohit anand mohit anand
mohit anand
 
20051019 automating regression testing for evolving gui software
20051019 automating regression testing for evolving gui software20051019 automating regression testing for evolving gui software
20051019 automating regression testing for evolving gui software
 

More from Porfirio Tramontana

Towards the Generation of Robust E2E Test Cases in Template-based Web Applica...
Towards the Generation of Robust E2E Test Cases in Template-based Web Applica...Towards the Generation of Robust E2E Test Cases in Template-based Web Applica...
Towards the Generation of Robust E2E Test Cases in Template-based Web Applica...
Porfirio Tramontana
 
Using Dynamic Analysis for Generating End User Documentation for Web 2.0 Appl...
Using Dynamic Analysis for Generating End User Documentation for Web 2.0 Appl...Using Dynamic Analysis for Generating End User Documentation for Web 2.0 Appl...
Using Dynamic Analysis for Generating End User Documentation for Web 2.0 Appl...
Porfirio Tramontana
 
Reverse Engineering Finite State Machines from Rich Internet Applications
Reverse Engineering Finite State Machines from Rich Internet ApplicationsReverse Engineering Finite State Machines from Rich Internet Applications
Reverse Engineering Finite State Machines from Rich Internet Applications
Porfirio Tramontana
 

More from Porfirio Tramontana (20)

An Approach for Model Based Testing of Augmented Reality Applications.pdf
An Approach for Model Based Testing of Augmented Reality Applications.pdfAn Approach for Model Based Testing of Augmented Reality Applications.pdf
An Approach for Model Based Testing of Augmented Reality Applications.pdf
 
Towards the Generation of Robust E2E Test Cases in Template-based Web Applica...
Towards the Generation of Robust E2E Test Cases in Template-based Web Applica...Towards the Generation of Robust E2E Test Cases in Template-based Web Applica...
Towards the Generation of Robust E2E Test Cases in Template-based Web Applica...
 
Techniques and Tools for Mobile Testing Automation
Techniques and Tools for Mobile Testing AutomationTechniques and Tools for Mobile Testing Automation
Techniques and Tools for Mobile Testing Automation
 
Reverse Engineering of Data Models from Legacy Spreadsheets-Based Systems: An...
Reverse Engineering of Data Models from Legacy Spreadsheets-Based Systems: An...Reverse Engineering of Data Models from Legacy Spreadsheets-Based Systems: An...
Reverse Engineering of Data Models from Legacy Spreadsheets-Based Systems: An...
 
Reverse Engineering Techniques: from Web Applications to Rich Internet Applic...
Reverse Engineering Techniques: from Web Applications to Rich Internet Applic...Reverse Engineering Techniques: from Web Applications to Rich Internet Applic...
Reverse Engineering Techniques: from Web Applications to Rich Internet Applic...
 
Web Application Testing in Fifteen Years of WSE
Web Application Testing in Fifteen Years of WSEWeb Application Testing in Fifteen Years of WSE
Web Application Testing in Fifteen Years of WSE
 
Towards a Better Comprehensibility of Web Applications: Lessons Learned from ...
Towards a Better Comprehensibility of Web Applications: Lessons Learned from ...Towards a Better Comprehensibility of Web Applications: Lessons Learned from ...
Towards a Better Comprehensibility of Web Applications: Lessons Learned from ...
 
Comprehending Web Applications by a Clustering Based Approach
Comprehending Web Applications by a Clustering Based Approach Comprehending Web Applications by a Clustering Based Approach
Comprehending Web Applications by a Clustering Based Approach
 
Reverse Engineering Web Applications
Reverse Engineering Web ApplicationsReverse Engineering Web Applications
Reverse Engineering Web Applications
 
Recovering Interaction Design Patterns in Web Applications
Recovering Interaction Design Patterns in Web Applications Recovering Interaction Design Patterns in Web Applications
Recovering Interaction Design Patterns in Web Applications
 
Improving Usability of Web Pages for Blind
Improving Usability of Web Pages for BlindImproving Usability of Web Pages for Blind
Improving Usability of Web Pages for Blind
 
Techniques and Tools for Rich Internet Applications Testing
Techniques and Tools for Rich Internet Applications TestingTechniques and Tools for Rich Internet Applications Testing
Techniques and Tools for Rich Internet Applications Testing
 
Comprehending Ajax Web Applications by the DynaRIA Tool
Comprehending Ajax Web Applications by the DynaRIA ToolComprehending Ajax Web Applications by the DynaRIA Tool
Comprehending Ajax Web Applications by the DynaRIA Tool
 
Using Dynamic Analysis for Generating End User Documentation for Web 2.0 Appl...
Using Dynamic Analysis for Generating End User Documentation for Web 2.0 Appl...Using Dynamic Analysis for Generating End User Documentation for Web 2.0 Appl...
Using Dynamic Analysis for Generating End User Documentation for Web 2.0 Appl...
 
DynaRIA: a Tool for Ajax Web Application Comprehension
DynaRIA: a Tool for Ajax Web Application ComprehensionDynaRIA: a Tool for Ajax Web Application Comprehension
DynaRIA: a Tool for Ajax Web Application Comprehension
 
Rich Internet Application Testing Using Execution Trace Data
Rich Internet Application Testing  Using Execution Trace Data Rich Internet Application Testing  Using Execution Trace Data
Rich Internet Application Testing Using Execution Trace Data
 
An AHP-based Framework for Quality and Security Evaluation
An AHP-based Framework for Quality and Security EvaluationAn AHP-based Framework for Quality and Security Evaluation
An AHP-based Framework for Quality and Security Evaluation
 
Experimenting a Reverse Engineering Technique for Modelling the Behaviour of ...
Experimenting a Reverse Engineering Technique for Modelling the Behaviour of ...Experimenting a Reverse Engineering Technique for Modelling the Behaviour of ...
Experimenting a Reverse Engineering Technique for Modelling the Behaviour of ...
 
Reverse Engineering Finite State Machines from Rich Internet Applications
Reverse Engineering Finite State Machines from Rich Internet ApplicationsReverse Engineering Finite State Machines from Rich Internet Applications
Reverse Engineering Finite State Machines from Rich Internet Applications
 
Web Pages Classification using Concept Analysis
Web Pages Classification using Concept Analysis Web Pages Classification using Concept Analysis
Web Pages Classification using Concept Analysis
 

Recently uploaded

Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Victor Rentea
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Safe Software
 
Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native Applications
WSO2
 

Recently uploaded (20)

Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
 
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
 
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
 
Cyberprint. Dark Pink Apt Group [EN].pdf
Cyberprint. Dark Pink Apt Group [EN].pdfCyberprint. Dark Pink Apt Group [EN].pdf
Cyberprint. Dark Pink Apt Group [EN].pdf
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century education
 
[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdf[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdf
 
Exploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with MilvusExploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with Milvus
 
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
 
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
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
 
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
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 
Artificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyArtificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : Uncertainty
 
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodPolkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
 
Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native Applications
 
DBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor PresentationDBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor Presentation
 
ICT role in 21st century education and its challenges
ICT role in 21st century education and its challengesICT role in 21st century education and its challenges
ICT role in 21st century education and its challenges
 
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
 
Spring Boot vs Quarkus the ultimate battle - DevoxxUK
Spring Boot vs Quarkus the ultimate battle - DevoxxUKSpring Boot vs Quarkus the ultimate battle - DevoxxUK
Spring Boot vs Quarkus the ultimate battle - DevoxxUK
 

A Toolset for GUI Testing of Android Applications

  • 1. A Toolset for GUI Testing of Android Applications Domenico Amalfitano Anna Rita Fasolino Porfirio Tramontana Salvatore De Carmine Gennaro Imparato Dipartimento di Informatica e Sistemistica University of Naples Federico II, Italy
  • 2. Context and Motivation Android OS is currently the most diffused platform for mobile devices [Gartner, 2012 August] – 98 Millions of Mobile Device sales with Android OS in second quarter 2012 – Android owns 64% of Market Share Google Play market now includes over than 500,000 apps – Most of these apps have been developed by small programmer teams, by evolutionary life cycles with very frequent releases via Google Play There is a strong need for fast and effective Testing automation solutions 2
  • 3. Current Technologies and Tools for Android Testing Testing Frameworks for Unit and GUI testing – Robotium, MonkeyRunner, Calculon, Roboelectric, … Stress testing Tools such as Monkey Testing tools from research projects: – TEMA model-based testing tools [Harty], … Debugging tools – DDMS debugging tool from the Android SDK Monitoring tools – platforms for monitoring app usages and reporting app crashes to the developers (like Crittericism) 4
  • 4. Our Proposal: A toolset for automatic GUI Testing of Android apps • GUI testing is an effective approach for testing an app through its GUI, firing sequences of events and providing it with user inputs • The proposed GUI testing toolset is based on a configurable GUI Ripper (Android Ripper) that: – automatically traverses the GUI firing sequences of events through the UI or the device (device rotation, press back button, etc.) – implements a Black-Box testing approach – obtains automatically JUnit test cases (usable for regression testing) 5
  • 5. Android Ripper Features The Ripper automatically explores the GUI structure and returns a GUI Tree model • It can be configured in order to emulate several kinds of user behaviours, choosing: • types of event to be fired, input values, time delays between events, GUI traversing strategy (e.g. depth first, breadth first, etc.), termination criterion to stop GUI traversal ... • It detects runtime crashes (due to unhandled Java exceptions) and returns the sequences of events causing them
  • 6. An example ≡ of GUI Rotate ≡ Ripping Click Pages Click Click Refresh Press Menu New Post … Click Add Click About Account Click Save … Crash Click Edit 7 … …
  • 7. Android Ripper Technological Details The Ripper is implemented as an Android Android JUnit Test Project. Instrumentation Application Under Test It exploits the Robotium Robotium Storage framework and Android Instrumentation classes to Robot JUnit Extractor Persistence Manager interact with the Application Abstractor Under Test (AUT) Comparator Scheduler The AUT source code can be instrumented with EMMA to Engine Strategy calculate the code covered by the Ripper. Planner The Saving SnapShot feature offers a mechanism to define the preconditions of the AUT
  • 8. Toolset and Testing procedure The testing procedure executing the Android Ripper is performed automatically using a set of batch and jar files.
  • 9. Experiments We tested some open source apps from Google Play market using Android Ripper, finding several unknown bugs (reported to the developers) A. U. T. # Ripping # Bugs # Crashes % LOC Events Time Coverage (hours) BookCatalogue 1,677 61 2 9 57 AarDdict 93 2.2 1 5 70 Tomdroid 86 1.25 1 13 39 Wordpress 486 6.16 6 31 43
  • 10. Future Works • We plan to extend the Ripper : • By implementing new event firing strategies • By considering new sources of events (sensors) and new input selection strategies. • We will address the technological issues affecting the Ripper execution on real devices. • We will be pleased to further explain the toolset usage in the Tool Bazar !