SlideShare ist ein Scribd-Unternehmen logo
1 von 97
Downloaden Sie, um offline zu lesen
ICSME16
Raleigh, NC
Wednesday, October 5th, 2016
Kevin Moran,
Mario Linares-Vásquez,
& Denys Poshyvanyk
College of William & Mary - SEMERU - Department of Computer Science
Automated GUITesting of Android
Apps: From Research to Practice
&
GUI-Based Software Testing
UI Events
GUITesting: The Main Idea
UI Events
Oracle
GUITesting: The Main Idea
Output, layout, exceptions,
presentation logic, quality attributes, …
UI Events
Oracle
GUITesting: The Main Idea
GUITesting: Core Concepts
Test
Result
Oracle
GUITesting: Core Concepts
Test
Result
Oracle
Monkey Testing !!
Monkey Testing !!
Automated Testing !!
Automated GUI-Testing
Output, layout, exceptions,
presentation logic, quality attributes, …
UI Events
Monkey
GUI-Based Testing for Mobile Apps
The App Economy
http://de.my-walls.net/android-os-robot/
10
10
Mobile App Dev Challenges
• Rapid platform (and third-party lib) evolution
• API-instability and fault-proneness
• Influx of unstructured (“low quality”) user reviews
• Platform-fragmentation at device and OS level
• Quality attributes (performance, energy) and
inputs (sensors, camera, WiFi etc.)
Android (andThird Party library) Instability
Study: mining of code changes
history (5,848 apps); survey with 45
developers
Method: descriptive statistics,
statistical hypothesis testing, and
open coding
Main findings:
- Successful apps use more stable and bug
free APIs
- APIs issues are perceived by users as app
programming issues
- Lack of tools for identifying API issues and
their impact on a new API release
Android (andThird Party library) Instability
LargeVolumed of Crowdsourced
Requirements and Ratings
Mobile AppTesting Challenges
• Highly event-driven, gesture based nature of apps
• Lack of effective automated input generation
• Lack of robust (semi) automated testing and
monitoring tools
• Lack of support for debugging apps and bug
reporting
Joorabchi, M.E.; Mesbah, A.; Kruchten, P., "Real Challenges in Mobile App Development," in Empirical Software
Engineering and Measurement, 2013 ACM / IEEE International Symposium on , vol., no., pp.15-24, 10-11 Oct. 2013
Manual Testing is Still Preferred!!
Automated Mobile Testing Approaches
Record & Replay
AUT/SUT
UI Events
Record & Replay
AUT/SUT
UI Events
Recorder Script
Record & Replay
AUT/SUT
UI Events
Recorder Script
Scripts
Record & Replay
AUT/SUT
UI Events
Recorder Script
Scripts
UI Events
Monkey AUT/SUT
UI Events
Pros and Cons
R&R ✓ Easy reproduction - Expensive collection
and maintenance
- Coupled to locations
Model-BasedTesting
UI Events
Model Monkey AUT/SUT
Model-BasedTesting
UI Events
Model Monkey AUT/SUT
- Manually generated
- Automatically generated (source code)
- Ripped at runtime (upfront)
- Ripped at runtime (interactive)
GUI-Rippers
Ripper/Extractor ModelAUT/SUT Monkey
GUI-Rippers
Ripper/Extractor ModelAUT/SUT Monkey
Snapshot 1
GUI-Rippers
Ripper/Extractor ModelAUT/SUT Monkey
Snapshot 1
Snapshot 1
GUI-Rippers
Ripper/Extractor ModelAUT/SUT Monkey
Snapshot 1
Snapshot 1
GUI State 1
GUI-Rippers
Ripper/Extractor ModelAUT/SUT Monkey
Snapshot 1
Snapshot 1
GUI State 1
A or B ?
GUI-Rippers
Ripper/Extractor ModelAUT/SUT Monkey
Snapshot 1
Snapshot 1
GUI State 1
Event 1
A or B ?
GUI-Rippers
Ripper/Extractor ModelAUT/SUT Monkey
Snapshot 1
Snapshot 1
GUI State 1
Event 1
Snapshot 2
Snapshot 2
GUI State 2
A or B ?
GUI-Rippers
Monkey
A or B ?
GUI-Rippers
Monkey
A or B ?
Breadth-FirstDepth-First
GUI-Rippers
Monkey
A or B ?
Breadth-FirstDepth-First
Random (Uniform) Random (A-priori distr.)
Other options (online decision)
GUI-Rippers
Ripper/Extractor
Computer/Mobile device
OS
- Framework
- API
- Utilities
GUI State
Events
Monkey
Pros and Cons
R&R ✓Easy reproduction - Expensive collection
and maintenance
- Coupled to locations
MBT ✓ Event sequences
✓ Automatic exploration
- Invalid sequences (a-
priori model)
- Few corner cases
- Use cases are not
considered
- Manual execution
- Incomplete models
Pros and Cons
R&R ✓Easy reproduction - Expensive collection
and maintenance
- Coupled to locations
MBT ✓ Event sequences
✓ Automatic exploration
- Invalid sequences (a-
priori model)
- Few corner cases
- Use cases are not
considered
- Manual execution
- Incomplete models
Rippers
- Lack of context
- No history awareness
Random/FuzzTesting (R/FT)
Monkey
X or Y ?
AUT/SUT
Random/FuzzTesting (R/FT)
Monkey
X or Y ?
AUT/SUT
Event x
Invalid
Random/FuzzTesting (R/FT)
Monkey
X or Y ?
AUT/SUT
Event x
Invalid
Event Y
Valid
Pros and Cons
R&R ✓ Easy reproduction - Expensive collection
and maintenance
- Coupled to locations
MBT ✓ Event sequences
✓ Automatic exploration
- Invalid sequences (a-
priori model)
- Few corner cases
- Use cases are not
considered
- Manual execution
- Incomplete models
Rippers
- Lack of context
- No history awareness
R/FT ✓ Fast execution
✓ Good at finding crashes
- Invalid events
- Lack of expressiveness
Automation Frameworks/APIs (AF/A)
TESTS
JUnit, Espresso, UI Automator, Robotium
Monkey
Automation Frameworks/APIs (AF/A)
UI Automator
Pros and Cons
R&R ✓ Easy reproduction
- Expensive collection
and maintenance
- Coupled to locations
MBT ✓ Event sequences
✓ Automatic exploration
- Invalid sequences (a-priori
model)
- Few corner cases
- Use cases are not considered
- Manual execution
- Incomplete models
Rippers
- Lack of context
- No history awareness
R/FT ✓ Fast execution
✓ Good at finding crashes
- Invalid events
- Lack of expressiveness
AF/A ✓ Easy reproduction
✓ High level syntax
✓ Black box testing
- Learning curve
- User-defined oracles
- Expensive maintenance
RESEARCH PROTOTYPES
Tool Name Instrumentation GUI Exploration Types of Events
Replayable Test
Cases
Emulators, Devices
Dynodroid Yes Guided/Random System, GUI, Text No No
EvoDroid No System/Evo GUI No N/A
AndroidRipper Yes Systematic GUI, Text No N/A
MobiGUItar Yes Model-Based GUI, Text Yes N/A
A3E Depth-First Yes Systematic GUI No Yes
A3E Targeted Yes Model-Based GUI No Yes
Swifthand Yes Model-Based GUI, Text No Yes
PUMA Yes Programmable System, GUI, Text No Yes
ACTEve Yes Systematic GUI No Yes
VANARSena Yes Random System, GUI, Text Yes N/A
Thor Yes Test Cases Test Case Events N/A No
QUANTUM Yes Model-Based System, GUI Yes N/A
AppDoctor Yes Multiple System, GUI2, Text Yes N/A
ORBIT No Model-Based GUI No N/A
SPAG-C No Record/Replay GUI N/A No
JPF-Android No Scripting GUI Yes N/A
MonkeyLab No Model-based GUI, Text Yes Yes
CrashDroid No Manual Rec/Replay GUI, Text Yes Yes
SIG-Droid No Symbolic GUI, Text Yes N/A
CrashScope No Systematic GUI, Text, System Yes Yes
Sapienz Yes Evolutionary GUI, Text,System Yes Yes
OTHER APPROACHES
FOR MOBILE GUI TESTING
CrowdsourcedTesting
AUT/SUTThird Party Service
Remote ManualTesting (Device Farm)
Third Party Service
Google Alpha/BetaTesting
https://support.google.com/googleplay/android-developer/answer/3131213
Tools: Summary
Testing Automation Frameworks/APIs
Crowdsourced Testing/Cloud-based Testing
Record and Replay
Monkey (Fuzz testing)
Tools: Summary
Testing Automation Frameworks/APIs
Crowdsourced Testing/Cloud-based Testing
Record and Replay
Monkey (Fuzz testing) ✓ Unexpected scenarios
- Reproducibility/Expressiveness
Tools: Summary
Testing Automation Frameworks/APIs
Crowdsourced Testing/Cloud-based Testing
Record and Replay
✓ Easy reproduction
✓ Automation on different devices
- Test scripts maintenance
- Learning curve
Monkey (Fuzz testing) ✓ Unexpected scenarios
- Reproducibility/Expressiveness
Tools: Summary
Testing Automation Frameworks/APIs
Crowdsourced Testing/Cloud-based Testing
Record and Replay
✓ Automation on different devices
✓ Similar to manual testing
- Test scripts maintenance
✓ Easy reproduction
✓ Automation on different devices
- Test scripts maintenance
- Learning curve
Monkey (Fuzz testing) ✓ Unexpected scenarios
- Reproducibility/Expressiveness
Tools: Summary
Testing Automation Frameworks/APIs
Crowdsourced Testing/Cloud-based Testing
Record and Replay
- Open Source vs Paid
✓ Large set of devices
✓ Remote data collection
✓ Support automation frameworks
✓ Automation on different devices
✓ Similar to manual testing
- Test scripts maintenance
✓ Easy reproduction
✓ Automation on different devices
- Test scripts maintenance
- Learning curve
Monkey (Fuzz testing) ✓ Unexpected scenarios
- Reproducibility/Expressiveness
Supporting evolution and
maintenance of
Android apps
Mining Android
Software
Repositories
Supporting evolution and
maintenance of
Android apps
Mining Android
Software
Repositories
Android API instability
[FSE’13][TSE’15]
Performance
bottlenecks [ICSME’15]
[MSR’16]
User reviews [ICSME’15]
Energy [MSR’14]
Supporting evolution and
maintenance of
Android apps
Mining Android
Software
Repositories
Android API instability
[FSE’13][TSE’15]
Performance
bottlenecks [ICSME’15]
[MSR’16]
User reviews [ICSME’15]
Energy [MSR’14]
Crowdsource-based
requirements
[ICSME’15]
GUI - based testing
[MSR’15]
Bug reporting [FSE’15]
Optimizing energy
consumption [FSE’15]
SEMERUTools: Monkey Lab
• Testing approach based on natural usages of
an application.
• Models usage using n-gram language models to
produce unseen yet natural event sequences.
• Capable of generating orthogonal test cases
to those already modeled.
SEMERUTools: Monkey Lab
• Testing approach based on natural usages of
an application.
• Models usage using n-gram language models to
produce unseen yet natural event sequences.
• Capable of generating orthogonal test cases
to those already modeled.
SEMERUTools: FUSION
www.fusion-android.com
• Novel Bug Reporting System for GUI-based
and mobile apps
• Uses a combination of static and dynamic
analysis to help inform the reporting process
• Uses auto-completion to ease the burden on
reporters and ensure high-quality reports.
SEMERUTools: FUSION
www.fusion-android.com
• Novel Bug Reporting System for GUI-based
and mobile apps
• Uses a combination of static and dynamic
analysis to help inform the reporting process
• Uses auto-completion to ease the burden on
reporters and ensure high-quality reports.
SEMERUTools: CRASHSCOPE
• Completely automated testing approach for Android apps
• Generates detailed, expressive bug reports and repayable
scripts
• A practical tool, requiring no instrumentation framework, or
modification to the OS or applications
• Capable of running on both physical devices and emulators
• Differing execution strategies able to test contextual features
SEMERUTools: CRASHSCOPE
• Completely automated testing approach for Android apps
• Generates detailed, expressive bug reports and repayable
scripts
• A practical tool, requiring no instrumentation framework, or
modification to the OS or applications
• Capable of running on both physical devices and emulators
• Differing execution strategies able to test contextual features
SEMERUTools: CRASHSCOPE
• Completely automated testing approach for Android apps
• Generates detailed, expressive bug reports and repayable
scripts
• A practical tool, requiring no instrumentation framework, or
modification to the OS or applications
• Capable of running on both physical devices and emulators
• Differing execution strategies able to test contextual features
Enabling Practical Automated Mobile GUI-Testing
Enabling Practical Automated Mobile GUI-Testing
Essential Challenges in Mobile GUITesting
Essential Challenges
Test Oracles: How does one design an extensible GUI- based
oracle that can be used to verify expected application behavior
across different device configurations?
Event Coordination: In automated GUI-based testing, deciding the
proper timing of firing events on a device is challenging.
External Features: How can external features such as notifications
be properly incorporated into large-scale testing of mobile apps?
External Dependencies: Many mobile apps use external servers or
databases in order to send, store, and receive information. How can
these dependencies be appropriately incorporated into large-scale
testing?
Essential Challenges in Mobile GUITesting
Essential Challenges
Test Oracles: How does one design an extensible GUI- based
oracle that can be used to verify expected application behavior
across different device configurations?
Event Coordination: In automated GUI-based testing, deciding the
proper timing of firing events on a device is challenging.
External Features: How can external features such as notifications
be properly incorporated into large-scale testing of mobile apps?
External Dependencies: Many mobile apps use external servers or
databases in order to send, store, and receive information. How can
these dependencies be appropriately incorporated into large-scale
testing?
Accidental Challenges in Mobile GUITesting
Accidental Challenges
Application Data and Cold Starts: How can one ensure a sterile or
desired testing environment within the context of large scale
testing?
Bugs in Framework Utilities: There exist certain limitations with
core Android Frameworks popular with GUI-testing.
Bugs and Limitations in the SDK Tools: There are limitations
inherent to Android developer tools, such as adb, that make
large-scale parallel execution and testing difficult.
Challenges Scaling Concurrent Virtual Devices: Android emulators
were not designed to scale well on modest hardware.
Accidental Challenges in Mobile GUITesting
Accidental Challenges
Application Data and Cold Starts: How can one ensure a sterile or
desired testing environment within the context of large scale
testing?
Bugs in Framework Utilities: There exist certain limitations with
core Android Frameworks popular with GUI-testing.
Bugs and Limitations in the SDK Tools: There are limitations
inherent to Android developer tools, such as adb, that make
large-scale parallel execution and testing difficult.
Challenges Scaling Concurrent Virtual Devices: Android emulators
were not designed to scale well on modest hardware.
Essential Challenges:Test Oracles
Potential Solution: Use a hash of the current screen hierarchy
Drawbacks: May miss some fined grained information about the
GUI (e.g. colors, images)
Essential Challenges:Test Oracles
Potential Solution: Use a hash of the current screen hierarchy
adb	shell		shell	/system/bin/uiautomator	
dump	/sdcard/ui_dump.xml
Drawbacks: May miss some fined grained information about the
GUI (e.g. colors, images)
Essential Challenges: Event Coordination
Essential Challenges: Event Coordination
adb	shell	dumpsys	window	-a
mAppTransitionState
APP_STATE_READY
APP_STATE_IDLE
APP_STATE_TIMEOUT
APP_STATE_RUNNING
Essential Challenges: External Features and Dependencies
Potential Solution: Use real usage data from the field?
Accidental Challenges:Application Data and Cold Starts
Accidental Challenges:Application Data and Cold Starts
adb	shell	rm	<app-data-folder>	
adb	shell	pm	clear	<app-package-name>
Accidental Challenges: Bugs in Framework Utilities
Accidental Challenges: Bugs in Framework Utilities
Accidental Challenges: Bugs in Framework Utilities
adb	shell		shell	/system/bin/uiautomator	
dump	/sdcard/ui_dump.xml
Accidental Challenges: Bugs in Framework Utilities
adb	shell		shell	/system/bin/uiautomator	
dump	/sdcard/ui_dump.xml
Accidental Challenges: Bugs in Framework Utilities
adb	shell		shell	/system/bin/uiautomator	
dump	/sdcard/ui_dump.xml
Solution: Modify Framework Components for the AOSP
Accidental Challenges: Bugs and Limitations in the SDKTools
adb	Server	1 adb	Server	2
Accidental Challenges: Bugs and Limitations in the SDKTools
adb	Server	1 adb	Server	2
No more than 15 devices per adb server
instance!
Accidental Challenges: Scaling ConcurrentVirtual Devices
Accidental Challenges: Scaling ConcurrentVirtual Devices
Record>Mine>Generate>Validate Framework
Record>Mine>Generate>Validate Framework
Record>Mine>Generate>Validate Framework
Enabling Large Scale Analysis: Execution Engine
✓Support for multiple
maintenance tasks
✓Open/Closed principle
✓Horizontal/Vertical scalability
✓Asynchronous communication
between clients and execution
engine
✓Support for fragmentation
Message bus
Execution Engine
Virtual devices (Pool)
Enabling Large Scale Analysis: Execution Engine
Dispatcher
Worker
Task
Device/VM/
Thread
token
Task, Device/VM/
Thread token
Task status,
response
Task status
- Task-specific
frameworks
- Third party libraries
<<invokes>>
Client i
Message Bus
Local DB
Client-specific
technologies
Request
(i.e., new Task)
Web folder or
Content Delivery
Network
Images,
files, etc.Images,
files, etc.
Response (i.e.,
Task results
and status)
Execution Engine (EE)
EE Settings
Devices/VMs
pool
Background
Threads pool
Clients
Client n
Enabling Large Scale Analysis: Execution Engine
Dispatcher
Worker
Task
Device/VM/
Thread
token
Task, Device/VM/
Thread token
Task status,
response
Task status
- Task-specific
frameworks
- Third party libraries
<<invokes>>
Client i
Message Bus
Local DB
Client-specific
technologies
Request
(i.e., new Task)
Web folder or
Content Delivery
Network
Images,
files, etc.Images,
files, etc.
Response (i.e.,
Task results
and status)
Execution Engine (EE)
EE Settings
Devices/VMs
pool
Background
Threads pool
Clients
Client n
THANK YOU!
Kevin Moran
kpmoran@cs.wm.edu
Mario Linares Vasquez
m.linaresv@uniandes.edu.co
Denys Poshyvanyk
denys@cs.wm.edu
http://www.research-appendix.com/android-testing

Weitere ähnliche Inhalte

Was ist angesagt?

Machine Learning-Based Prototyping of Graphical User Interfaces for Mobile Apps
Machine Learning-Based Prototyping of Graphical User Interfaces for Mobile AppsMachine Learning-Based Prototyping of Graphical User Interfaces for Mobile Apps
Machine Learning-Based Prototyping of Graphical User Interfaces for Mobile AppsKevin Moran
 
Эвристики, мнемоники и другие греческие слова в исследовательском тестировани...
Эвристики, мнемоники и другие греческие слова в исследовательском тестировани...Эвристики, мнемоники и другие греческие слова в исследовательском тестировани...
Эвристики, мнемоники и другие греческие слова в исследовательском тестировани...SQALab
 
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...Riccardo Coppola
 
Solving the 3 Biggest Questions in Continuous Testing
Solving the 3 Biggest Questions in Continuous TestingSolving the 3 Biggest Questions in Continuous Testing
Solving the 3 Biggest Questions in Continuous TestingPerfecto by Perforce
 
Preparing your QA team for mobile testing
Preparing your QA team for mobile testingPreparing your QA team for mobile testing
Preparing your QA team for mobile testingGeoffrey Goetz
 
Android automation tools
Android automation toolsAndroid automation tools
Android automation toolsSSGMCE SHEGAON
 
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
 
Uber Mobility Meetup: Mobile Testing
Uber Mobility Meetup:  Mobile TestingUber Mobility Meetup:  Mobile Testing
Uber Mobility Meetup: Mobile TestingApple Chow
 
Uber mobility - Build & Release
Uber mobility - Build & ReleaseUber mobility - Build & Release
Uber mobility - Build & ReleaseDhaval Patel
 
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
 
Fight back android fragmentation
Fight back android fragmentationFight back android fragmentation
Fight back android fragmentationBitbar
 
Top Best Practices for Successful Mobile Test Automation
Top Best Practices for Successful Mobile Test AutomationTop Best Practices for Successful Mobile Test Automation
Top Best Practices for Successful Mobile Test AutomationFred Beringer
 
Best Practices in Mobile Game Testing
Best Practices in Mobile Game TestingBest Practices in Mobile Game Testing
Best Practices in Mobile Game TestingBitbar
 
Continuous code quality_in_java
Continuous code quality_in_javaContinuous code quality_in_java
Continuous code quality_in_javaManimekalai48
 
Automation Open Source tools
Automation Open Source toolsAutomation Open Source tools
Automation Open Source toolsQA Club Kiev
 
Implementing Test Automation in Agile Projects
Implementing Test Automation in Agile ProjectsImplementing Test Automation in Agile Projects
Implementing Test Automation in Agile ProjectsDominik Dary
 
Choosing the Best Open Source Test Automation Tool for You
Choosing the Best Open Source Test Automation Tool for YouChoosing the Best Open Source Test Automation Tool for You
Choosing the Best Open Source Test Automation Tool for YouPerfecto by Perforce
 
Top 10 Automation Testing Tools in 2020
Top 10 Automation Testing Tools in 2020Top 10 Automation Testing Tools in 2020
Top 10 Automation Testing Tools in 2020Alaina Carter
 

Was ist angesagt? (20)

Machine Learning-Based Prototyping of Graphical User Interfaces for Mobile Apps
Machine Learning-Based Prototyping of Graphical User Interfaces for Mobile AppsMachine Learning-Based Prototyping of Graphical User Interfaces for Mobile Apps
Machine Learning-Based Prototyping of Graphical User Interfaces for Mobile Apps
 
Эвристики, мнемоники и другие греческие слова в исследовательском тестировани...
Эвристики, мнемоники и другие греческие слова в исследовательском тестировани...Эвристики, мнемоники и другие греческие слова в исследовательском тестировани...
Эвристики, мнемоники и другие греческие слова в исследовательском тестировани...
 
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...
 
Solving the 3 Biggest Questions in Continuous Testing
Solving the 3 Biggest Questions in Continuous TestingSolving the 3 Biggest Questions in Continuous Testing
Solving the 3 Biggest Questions in Continuous Testing
 
Preparing your QA team for mobile testing
Preparing your QA team for mobile testingPreparing your QA team for mobile testing
Preparing your QA team for mobile testing
 
Android automation tools
Android automation toolsAndroid automation tools
Android automation tools
 
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
 
Uber Mobility Meetup: Mobile Testing
Uber Mobility Meetup:  Mobile TestingUber Mobility Meetup:  Mobile Testing
Uber Mobility Meetup: Mobile Testing
 
Uber mobility - Build & Release
Uber mobility - Build & ReleaseUber mobility - Build & Release
Uber mobility - Build & Release
 
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
 
Using Robots for App Testing
Using Robots for App Testing Using Robots for App Testing
Using Robots for App Testing
 
Test and docs: Hand in hand
Test and docs: Hand in handTest and docs: Hand in hand
Test and docs: Hand in hand
 
Fight back android fragmentation
Fight back android fragmentationFight back android fragmentation
Fight back android fragmentation
 
Top Best Practices for Successful Mobile Test Automation
Top Best Practices for Successful Mobile Test AutomationTop Best Practices for Successful Mobile Test Automation
Top Best Practices for Successful Mobile Test Automation
 
Best Practices in Mobile Game Testing
Best Practices in Mobile Game TestingBest Practices in Mobile Game Testing
Best Practices in Mobile Game Testing
 
Continuous code quality_in_java
Continuous code quality_in_javaContinuous code quality_in_java
Continuous code quality_in_java
 
Automation Open Source tools
Automation Open Source toolsAutomation Open Source tools
Automation Open Source tools
 
Implementing Test Automation in Agile Projects
Implementing Test Automation in Agile ProjectsImplementing Test Automation in Agile Projects
Implementing Test Automation in Agile Projects
 
Choosing the Best Open Source Test Automation Tool for You
Choosing the Best Open Source Test Automation Tool for YouChoosing the Best Open Source Test Automation Tool for You
Choosing the Best Open Source Test Automation Tool for You
 
Top 10 Automation Testing Tools in 2020
Top 10 Automation Testing Tools in 2020Top 10 Automation Testing Tools in 2020
Top 10 Automation Testing Tools in 2020
 

Ähnlich wie Automated GUI-Testing of Android Apps: From Research to Practice

Continuous testing at scale
Continuous testing at scaleContinuous testing at scale
Continuous testing at scaleGergely Orosz
 
Testing Vue Apps with Cypress.io (STLJS Meetup April 2018)
Testing Vue Apps with Cypress.io (STLJS Meetup April 2018)Testing Vue Apps with Cypress.io (STLJS Meetup April 2018)
Testing Vue Apps with Cypress.io (STLJS Meetup April 2018)Christian Catalan
 
Антон Семенченко | (EPAM Systems, DPI.Solutions )Сравнительный анализ инстру...
Антон Семенченко | (EPAM Systems, DPI.Solutions )Сравнительный анализ инстру...Антон Семенченко | (EPAM Systems, DPI.Solutions )Сравнительный анализ инстру...
Антон Семенченко | (EPAM Systems, DPI.Solutions )Сравнительный анализ инстру...RIF-Technology
 
UIAutomation_Testing
UIAutomation_TestingUIAutomation_Testing
UIAutomation_TestingKrunal Soni
 
μ/log and the next 100 log systems
μ/log and the next 100 log systemsμ/log and the next 100 log systems
μ/log and the next 100 log systemsBruno Bonacci
 
Justin Ison
Justin IsonJustin Ison
Justin IsonCodeFest
 
Automated Exploratory Testing
Automated Exploratory TestingAutomated Exploratory Testing
Automated Exploratory TestingJustin Ison
 
Software Testing: Application And Script Independent Automation Framework: Th...
Software Testing: Application And Script Independent Automation Framework: Th...Software Testing: Application And Script Independent Automation Framework: Th...
Software Testing: Application And Script Independent Automation Framework: Th...guest0efb5e
 
Selenium conference, 2016
Selenium conference, 2016Selenium conference, 2016
Selenium conference, 2016Pooja Shah
 
20160913 cookpad ios_en
20160913 cookpad ios_en20160913 cookpad ios_en
20160913 cookpad ios_enKazuaki Matsuo
 
Appium@Work at PAYBACK
Appium@Work at PAYBACKAppium@Work at PAYBACK
Appium@Work at PAYBACKMarcel Gehlen
 
Good practices for debugging Selenium and Appium tests
Good practices for debugging Selenium and Appium testsGood practices for debugging Selenium and Appium tests
Good practices for debugging Selenium and Appium testsAbhijeet Vaikar
 
Meticulous Planning of Test Automation
Meticulous Planning of Test AutomationMeticulous Planning of Test Automation
Meticulous Planning of Test Automationssuser2e8d4b
 
Test Automation Demonstration with Dr Yongyan Wang by XBOSoft
Test Automation Demonstration with Dr Yongyan Wang by XBOSoftTest Automation Demonstration with Dr Yongyan Wang by XBOSoft
Test Automation Demonstration with Dr Yongyan Wang by XBOSoftXBOSoft
 
Experitest & Tech Mahindra Co-Webinar
 Experitest & Tech Mahindra Co-Webinar Experitest & Tech Mahindra Co-Webinar
Experitest & Tech Mahindra Co-WebinarExperitest
 
The Present and Future of Mobile Test Automation with Appium
The Present and Future of Mobile Test Automation with AppiumThe Present and Future of Mobile Test Automation with Appium
The Present and Future of Mobile Test Automation with AppiumTechWell
 
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
 
Trainmesofttech Manual testing course content
Trainmesofttech Manual testing course contentTrainmesofttech Manual testing course content
Trainmesofttech Manual testing course contentTrainmesofttech
 
2012 mobile testingsummit-moet
2012 mobile testingsummit-moet2012 mobile testingsummit-moet
2012 mobile testingsummit-moetEing Ong
 

Ähnlich wie Automated GUI-Testing of Android Apps: From Research to Practice (20)

Continuous testing at scale
Continuous testing at scaleContinuous testing at scale
Continuous testing at scale
 
Testing Vue Apps with Cypress.io (STLJS Meetup April 2018)
Testing Vue Apps with Cypress.io (STLJS Meetup April 2018)Testing Vue Apps with Cypress.io (STLJS Meetup April 2018)
Testing Vue Apps with Cypress.io (STLJS Meetup April 2018)
 
Антон Семенченко | (EPAM Systems, DPI.Solutions )Сравнительный анализ инстру...
Антон Семенченко | (EPAM Systems, DPI.Solutions )Сравнительный анализ инстру...Антон Семенченко | (EPAM Systems, DPI.Solutions )Сравнительный анализ инстру...
Антон Семенченко | (EPAM Systems, DPI.Solutions )Сравнительный анализ инстру...
 
UIAutomation_Testing
UIAutomation_TestingUIAutomation_Testing
UIAutomation_Testing
 
μ/log and the next 100 log systems
μ/log and the next 100 log systemsμ/log and the next 100 log systems
μ/log and the next 100 log systems
 
Justin Ison
Justin IsonJustin Ison
Justin Ison
 
Automated Exploratory Testing
Automated Exploratory TestingAutomated Exploratory Testing
Automated Exploratory Testing
 
Software Testing: Application And Script Independent Automation Framework: Th...
Software Testing: Application And Script Independent Automation Framework: Th...Software Testing: Application And Script Independent Automation Framework: Th...
Software Testing: Application And Script Independent Automation Framework: Th...
 
Selenium conference, 2016
Selenium conference, 2016Selenium conference, 2016
Selenium conference, 2016
 
20160913 cookpad ios_en
20160913 cookpad ios_en20160913 cookpad ios_en
20160913 cookpad ios_en
 
Appium@Work at PAYBACK
Appium@Work at PAYBACKAppium@Work at PAYBACK
Appium@Work at PAYBACK
 
Good practices for debugging Selenium and Appium tests
Good practices for debugging Selenium and Appium testsGood practices for debugging Selenium and Appium tests
Good practices for debugging Selenium and Appium tests
 
Suparna - XCUITest
Suparna - XCUITestSuparna - XCUITest
Suparna - XCUITest
 
Meticulous Planning of Test Automation
Meticulous Planning of Test AutomationMeticulous Planning of Test Automation
Meticulous Planning of Test Automation
 
Test Automation Demonstration with Dr Yongyan Wang by XBOSoft
Test Automation Demonstration with Dr Yongyan Wang by XBOSoftTest Automation Demonstration with Dr Yongyan Wang by XBOSoft
Test Automation Demonstration with Dr Yongyan Wang by XBOSoft
 
Experitest & Tech Mahindra Co-Webinar
 Experitest & Tech Mahindra Co-Webinar Experitest & Tech Mahindra Co-Webinar
Experitest & Tech Mahindra Co-Webinar
 
The Present and Future of Mobile Test Automation with Appium
The Present and Future of Mobile Test Automation with AppiumThe Present and Future of Mobile Test Automation with Appium
The Present and Future of Mobile Test Automation with Appium
 
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)
 
Trainmesofttech Manual testing course content
Trainmesofttech Manual testing course contentTrainmesofttech Manual testing course content
Trainmesofttech Manual testing course content
 
2012 mobile testingsummit-moet
2012 mobile testingsummit-moet2012 mobile testingsummit-moet
2012 mobile testingsummit-moet
 

Kürzlich hochgeladen

Take control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteTake control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteDianaGray10
 
(How to Program) Paul Deitel, Harvey Deitel-Java How to Program, Early Object...
(How to Program) Paul Deitel, Harvey Deitel-Java How to Program, Early Object...(How to Program) Paul Deitel, Harvey Deitel-Java How to Program, Early Object...
(How to Program) Paul Deitel, Harvey Deitel-Java How to Program, Early Object...AliaaTarek5
 
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptxThe Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptxLoriGlavin3
 
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptxThe Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptxLoriGlavin3
 
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024BookNet Canada
 
Genislab builds better products and faster go-to-market with Lean project man...
Genislab builds better products and faster go-to-market with Lean project man...Genislab builds better products and faster go-to-market with Lean project man...
Genislab builds better products and faster go-to-market with Lean project man...Farhan Tariq
 
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptxPasskey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptxLoriGlavin3
 
Scale your database traffic with Read & Write split using MySQL Router
Scale your database traffic with Read & Write split using MySQL RouterScale your database traffic with Read & Write split using MySQL Router
Scale your database traffic with Read & Write split using MySQL RouterMydbops
 
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...Wes McKinney
 
UiPath Community: Communication Mining from Zero to Hero
UiPath Community: Communication Mining from Zero to HeroUiPath Community: Communication Mining from Zero to Hero
UiPath Community: Communication Mining from Zero to HeroUiPathCommunity
 
Generative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information DevelopersGenerative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information DevelopersRaghuram Pandurangan
 
Modern Roaming for Notes and Nomad – Cheaper Faster Better Stronger
Modern Roaming for Notes and Nomad – Cheaper Faster Better StrongerModern Roaming for Notes and Nomad – Cheaper Faster Better Stronger
Modern Roaming for Notes and Nomad – Cheaper Faster Better Strongerpanagenda
 
A Journey Into the Emotions of Software Developers
A Journey Into the Emotions of Software DevelopersA Journey Into the Emotions of Software Developers
A Journey Into the Emotions of Software DevelopersNicole Novielli
 
Long journey of Ruby standard library at RubyConf AU 2024
Long journey of Ruby standard library at RubyConf AU 2024Long journey of Ruby standard library at RubyConf AU 2024
Long journey of Ruby standard library at RubyConf AU 2024Hiroshi SHIBATA
 
From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .Alan Dix
 
Generative Artificial Intelligence: How generative AI works.pdf
Generative Artificial Intelligence: How generative AI works.pdfGenerative Artificial Intelligence: How generative AI works.pdf
Generative Artificial Intelligence: How generative AI works.pdfIngrid Airi González
 
The Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsThe Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsPixlogix Infotech
 
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc
 
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyes
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyesHow to Effectively Monitor SD-WAN and SASE Environments with ThousandEyes
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyesThousandEyes
 
Enhancing User Experience - Exploring the Latest Features of Tallyman Axis Lo...
Enhancing User Experience - Exploring the Latest Features of Tallyman Axis Lo...Enhancing User Experience - Exploring the Latest Features of Tallyman Axis Lo...
Enhancing User Experience - Exploring the Latest Features of Tallyman Axis Lo...Scott Andery
 

Kürzlich hochgeladen (20)

Take control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteTake control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test Suite
 
(How to Program) Paul Deitel, Harvey Deitel-Java How to Program, Early Object...
(How to Program) Paul Deitel, Harvey Deitel-Java How to Program, Early Object...(How to Program) Paul Deitel, Harvey Deitel-Java How to Program, Early Object...
(How to Program) Paul Deitel, Harvey Deitel-Java How to Program, Early Object...
 
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptxThe Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
 
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptxThe Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
 
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
 
Genislab builds better products and faster go-to-market with Lean project man...
Genislab builds better products and faster go-to-market with Lean project man...Genislab builds better products and faster go-to-market with Lean project man...
Genislab builds better products and faster go-to-market with Lean project man...
 
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptxPasskey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptx
 
Scale your database traffic with Read & Write split using MySQL Router
Scale your database traffic with Read & Write split using MySQL RouterScale your database traffic with Read & Write split using MySQL Router
Scale your database traffic with Read & Write split using MySQL Router
 
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...
 
UiPath Community: Communication Mining from Zero to Hero
UiPath Community: Communication Mining from Zero to HeroUiPath Community: Communication Mining from Zero to Hero
UiPath Community: Communication Mining from Zero to Hero
 
Generative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information DevelopersGenerative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information Developers
 
Modern Roaming for Notes and Nomad – Cheaper Faster Better Stronger
Modern Roaming for Notes and Nomad – Cheaper Faster Better StrongerModern Roaming for Notes and Nomad – Cheaper Faster Better Stronger
Modern Roaming for Notes and Nomad – Cheaper Faster Better Stronger
 
A Journey Into the Emotions of Software Developers
A Journey Into the Emotions of Software DevelopersA Journey Into the Emotions of Software Developers
A Journey Into the Emotions of Software Developers
 
Long journey of Ruby standard library at RubyConf AU 2024
Long journey of Ruby standard library at RubyConf AU 2024Long journey of Ruby standard library at RubyConf AU 2024
Long journey of Ruby standard library at RubyConf AU 2024
 
From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .
 
Generative Artificial Intelligence: How generative AI works.pdf
Generative Artificial Intelligence: How generative AI works.pdfGenerative Artificial Intelligence: How generative AI works.pdf
Generative Artificial Intelligence: How generative AI works.pdf
 
The Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsThe Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and Cons
 
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
 
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyes
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyesHow to Effectively Monitor SD-WAN and SASE Environments with ThousandEyes
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyes
 
Enhancing User Experience - Exploring the Latest Features of Tallyman Axis Lo...
Enhancing User Experience - Exploring the Latest Features of Tallyman Axis Lo...Enhancing User Experience - Exploring the Latest Features of Tallyman Axis Lo...
Enhancing User Experience - Exploring the Latest Features of Tallyman Axis Lo...
 

Automated GUI-Testing of Android Apps: From Research to Practice

  • 1. ICSME16 Raleigh, NC Wednesday, October 5th, 2016 Kevin Moran, Mario Linares-Vásquez, & Denys Poshyvanyk College of William & Mary - SEMERU - Department of Computer Science Automated GUITesting of Android Apps: From Research to Practice &
  • 5. Output, layout, exceptions, presentation logic, quality attributes, … UI Events Oracle GUITesting: The Main Idea
  • 10. Automated GUI-Testing Output, layout, exceptions, presentation logic, quality attributes, … UI Events Monkey
  • 11. GUI-Based Testing for Mobile Apps
  • 13. 10
  • 14. 10
  • 15. Mobile App Dev Challenges • Rapid platform (and third-party lib) evolution • API-instability and fault-proneness • Influx of unstructured (“low quality”) user reviews • Platform-fragmentation at device and OS level • Quality attributes (performance, energy) and inputs (sensors, camera, WiFi etc.)
  • 16. Android (andThird Party library) Instability
  • 17. Study: mining of code changes history (5,848 apps); survey with 45 developers Method: descriptive statistics, statistical hypothesis testing, and open coding Main findings: - Successful apps use more stable and bug free APIs - APIs issues are perceived by users as app programming issues - Lack of tools for identifying API issues and their impact on a new API release Android (andThird Party library) Instability
  • 19. Mobile AppTesting Challenges • Highly event-driven, gesture based nature of apps • Lack of effective automated input generation • Lack of robust (semi) automated testing and monitoring tools • Lack of support for debugging apps and bug reporting Joorabchi, M.E.; Mesbah, A.; Kruchten, P., "Real Challenges in Mobile App Development," in Empirical Software Engineering and Measurement, 2013 ACM / IEEE International Symposium on , vol., no., pp.15-24, 10-11 Oct. 2013
  • 20. Manual Testing is Still Preferred!!
  • 23. Record & Replay AUT/SUT UI Events Recorder Script
  • 24. Record & Replay AUT/SUT UI Events Recorder Script Scripts
  • 25. Record & Replay AUT/SUT UI Events Recorder Script Scripts UI Events Monkey AUT/SUT UI Events
  • 26. Pros and Cons R&R ✓ Easy reproduction - Expensive collection and maintenance - Coupled to locations
  • 28. Model-BasedTesting UI Events Model Monkey AUT/SUT - Manually generated - Automatically generated (source code) - Ripped at runtime (upfront) - Ripped at runtime (interactive)
  • 34. GUI-Rippers Ripper/Extractor ModelAUT/SUT Monkey Snapshot 1 Snapshot 1 GUI State 1 Event 1 A or B ?
  • 35. GUI-Rippers Ripper/Extractor ModelAUT/SUT Monkey Snapshot 1 Snapshot 1 GUI State 1 Event 1 Snapshot 2 Snapshot 2 GUI State 2 A or B ?
  • 37. GUI-Rippers Monkey A or B ? Breadth-FirstDepth-First
  • 38. GUI-Rippers Monkey A or B ? Breadth-FirstDepth-First Random (Uniform) Random (A-priori distr.) Other options (online decision)
  • 40. Pros and Cons R&R ✓Easy reproduction - Expensive collection and maintenance - Coupled to locations MBT ✓ Event sequences ✓ Automatic exploration - Invalid sequences (a- priori model) - Few corner cases - Use cases are not considered - Manual execution - Incomplete models
  • 41. Pros and Cons R&R ✓Easy reproduction - Expensive collection and maintenance - Coupled to locations MBT ✓ Event sequences ✓ Automatic exploration - Invalid sequences (a- priori model) - Few corner cases - Use cases are not considered - Manual execution - Incomplete models Rippers - Lack of context - No history awareness
  • 43. Random/FuzzTesting (R/FT) Monkey X or Y ? AUT/SUT Event x Invalid
  • 44. Random/FuzzTesting (R/FT) Monkey X or Y ? AUT/SUT Event x Invalid Event Y Valid
  • 45. Pros and Cons R&R ✓ Easy reproduction - Expensive collection and maintenance - Coupled to locations MBT ✓ Event sequences ✓ Automatic exploration - Invalid sequences (a- priori model) - Few corner cases - Use cases are not considered - Manual execution - Incomplete models Rippers - Lack of context - No history awareness R/FT ✓ Fast execution ✓ Good at finding crashes - Invalid events - Lack of expressiveness
  • 46. Automation Frameworks/APIs (AF/A) TESTS JUnit, Espresso, UI Automator, Robotium Monkey
  • 48. Pros and Cons R&R ✓ Easy reproduction - Expensive collection and maintenance - Coupled to locations MBT ✓ Event sequences ✓ Automatic exploration - Invalid sequences (a-priori model) - Few corner cases - Use cases are not considered - Manual execution - Incomplete models Rippers - Lack of context - No history awareness R/FT ✓ Fast execution ✓ Good at finding crashes - Invalid events - Lack of expressiveness AF/A ✓ Easy reproduction ✓ High level syntax ✓ Black box testing - Learning curve - User-defined oracles - Expensive maintenance
  • 49. RESEARCH PROTOTYPES Tool Name Instrumentation GUI Exploration Types of Events Replayable Test Cases Emulators, Devices Dynodroid Yes Guided/Random System, GUI, Text No No EvoDroid No System/Evo GUI No N/A AndroidRipper Yes Systematic GUI, Text No N/A MobiGUItar Yes Model-Based GUI, Text Yes N/A A3E Depth-First Yes Systematic GUI No Yes A3E Targeted Yes Model-Based GUI No Yes Swifthand Yes Model-Based GUI, Text No Yes PUMA Yes Programmable System, GUI, Text No Yes ACTEve Yes Systematic GUI No Yes VANARSena Yes Random System, GUI, Text Yes N/A Thor Yes Test Cases Test Case Events N/A No QUANTUM Yes Model-Based System, GUI Yes N/A AppDoctor Yes Multiple System, GUI2, Text Yes N/A ORBIT No Model-Based GUI No N/A SPAG-C No Record/Replay GUI N/A No JPF-Android No Scripting GUI Yes N/A MonkeyLab No Model-based GUI, Text Yes Yes CrashDroid No Manual Rec/Replay GUI, Text Yes Yes SIG-Droid No Symbolic GUI, Text Yes N/A CrashScope No Systematic GUI, Text, System Yes Yes Sapienz Yes Evolutionary GUI, Text,System Yes Yes
  • 52. Remote ManualTesting (Device Farm) Third Party Service
  • 54. Tools: Summary Testing Automation Frameworks/APIs Crowdsourced Testing/Cloud-based Testing Record and Replay Monkey (Fuzz testing)
  • 55. Tools: Summary Testing Automation Frameworks/APIs Crowdsourced Testing/Cloud-based Testing Record and Replay Monkey (Fuzz testing) ✓ Unexpected scenarios - Reproducibility/Expressiveness
  • 56. Tools: Summary Testing Automation Frameworks/APIs Crowdsourced Testing/Cloud-based Testing Record and Replay ✓ Easy reproduction ✓ Automation on different devices - Test scripts maintenance - Learning curve Monkey (Fuzz testing) ✓ Unexpected scenarios - Reproducibility/Expressiveness
  • 57. Tools: Summary Testing Automation Frameworks/APIs Crowdsourced Testing/Cloud-based Testing Record and Replay ✓ Automation on different devices ✓ Similar to manual testing - Test scripts maintenance ✓ Easy reproduction ✓ Automation on different devices - Test scripts maintenance - Learning curve Monkey (Fuzz testing) ✓ Unexpected scenarios - Reproducibility/Expressiveness
  • 58. Tools: Summary Testing Automation Frameworks/APIs Crowdsourced Testing/Cloud-based Testing Record and Replay - Open Source vs Paid ✓ Large set of devices ✓ Remote data collection ✓ Support automation frameworks ✓ Automation on different devices ✓ Similar to manual testing - Test scripts maintenance ✓ Easy reproduction ✓ Automation on different devices - Test scripts maintenance - Learning curve Monkey (Fuzz testing) ✓ Unexpected scenarios - Reproducibility/Expressiveness
  • 59. Supporting evolution and maintenance of Android apps Mining Android Software Repositories
  • 60. Supporting evolution and maintenance of Android apps Mining Android Software Repositories Android API instability [FSE’13][TSE’15] Performance bottlenecks [ICSME’15] [MSR’16] User reviews [ICSME’15] Energy [MSR’14]
  • 61. Supporting evolution and maintenance of Android apps Mining Android Software Repositories Android API instability [FSE’13][TSE’15] Performance bottlenecks [ICSME’15] [MSR’16] User reviews [ICSME’15] Energy [MSR’14] Crowdsource-based requirements [ICSME’15] GUI - based testing [MSR’15] Bug reporting [FSE’15] Optimizing energy consumption [FSE’15]
  • 62. SEMERUTools: Monkey Lab • Testing approach based on natural usages of an application. • Models usage using n-gram language models to produce unseen yet natural event sequences. • Capable of generating orthogonal test cases to those already modeled.
  • 63. SEMERUTools: Monkey Lab • Testing approach based on natural usages of an application. • Models usage using n-gram language models to produce unseen yet natural event sequences. • Capable of generating orthogonal test cases to those already modeled.
  • 64. SEMERUTools: FUSION www.fusion-android.com • Novel Bug Reporting System for GUI-based and mobile apps • Uses a combination of static and dynamic analysis to help inform the reporting process • Uses auto-completion to ease the burden on reporters and ensure high-quality reports.
  • 65. SEMERUTools: FUSION www.fusion-android.com • Novel Bug Reporting System for GUI-based and mobile apps • Uses a combination of static and dynamic analysis to help inform the reporting process • Uses auto-completion to ease the burden on reporters and ensure high-quality reports.
  • 66. SEMERUTools: CRASHSCOPE • Completely automated testing approach for Android apps • Generates detailed, expressive bug reports and repayable scripts • A practical tool, requiring no instrumentation framework, or modification to the OS or applications • Capable of running on both physical devices and emulators • Differing execution strategies able to test contextual features
  • 67. SEMERUTools: CRASHSCOPE • Completely automated testing approach for Android apps • Generates detailed, expressive bug reports and repayable scripts • A practical tool, requiring no instrumentation framework, or modification to the OS or applications • Capable of running on both physical devices and emulators • Differing execution strategies able to test contextual features
  • 68. SEMERUTools: CRASHSCOPE • Completely automated testing approach for Android apps • Generates detailed, expressive bug reports and repayable scripts • A practical tool, requiring no instrumentation framework, or modification to the OS or applications • Capable of running on both physical devices and emulators • Differing execution strategies able to test contextual features
  • 69. Enabling Practical Automated Mobile GUI-Testing
  • 70. Enabling Practical Automated Mobile GUI-Testing
  • 71. Essential Challenges in Mobile GUITesting Essential Challenges Test Oracles: How does one design an extensible GUI- based oracle that can be used to verify expected application behavior across different device configurations? Event Coordination: In automated GUI-based testing, deciding the proper timing of firing events on a device is challenging. External Features: How can external features such as notifications be properly incorporated into large-scale testing of mobile apps? External Dependencies: Many mobile apps use external servers or databases in order to send, store, and receive information. How can these dependencies be appropriately incorporated into large-scale testing?
  • 72. Essential Challenges in Mobile GUITesting Essential Challenges Test Oracles: How does one design an extensible GUI- based oracle that can be used to verify expected application behavior across different device configurations? Event Coordination: In automated GUI-based testing, deciding the proper timing of firing events on a device is challenging. External Features: How can external features such as notifications be properly incorporated into large-scale testing of mobile apps? External Dependencies: Many mobile apps use external servers or databases in order to send, store, and receive information. How can these dependencies be appropriately incorporated into large-scale testing?
  • 73. Accidental Challenges in Mobile GUITesting Accidental Challenges Application Data and Cold Starts: How can one ensure a sterile or desired testing environment within the context of large scale testing? Bugs in Framework Utilities: There exist certain limitations with core Android Frameworks popular with GUI-testing. Bugs and Limitations in the SDK Tools: There are limitations inherent to Android developer tools, such as adb, that make large-scale parallel execution and testing difficult. Challenges Scaling Concurrent Virtual Devices: Android emulators were not designed to scale well on modest hardware.
  • 74. Accidental Challenges in Mobile GUITesting Accidental Challenges Application Data and Cold Starts: How can one ensure a sterile or desired testing environment within the context of large scale testing? Bugs in Framework Utilities: There exist certain limitations with core Android Frameworks popular with GUI-testing. Bugs and Limitations in the SDK Tools: There are limitations inherent to Android developer tools, such as adb, that make large-scale parallel execution and testing difficult. Challenges Scaling Concurrent Virtual Devices: Android emulators were not designed to scale well on modest hardware.
  • 75. Essential Challenges:Test Oracles Potential Solution: Use a hash of the current screen hierarchy Drawbacks: May miss some fined grained information about the GUI (e.g. colors, images)
  • 76. Essential Challenges:Test Oracles Potential Solution: Use a hash of the current screen hierarchy adb shell shell /system/bin/uiautomator dump /sdcard/ui_dump.xml Drawbacks: May miss some fined grained information about the GUI (e.g. colors, images)
  • 78. Essential Challenges: Event Coordination adb shell dumpsys window -a mAppTransitionState APP_STATE_READY APP_STATE_IDLE APP_STATE_TIMEOUT APP_STATE_RUNNING
  • 79. Essential Challenges: External Features and Dependencies Potential Solution: Use real usage data from the field?
  • 81. Accidental Challenges:Application Data and Cold Starts adb shell rm <app-data-folder> adb shell pm clear <app-package-name>
  • 82. Accidental Challenges: Bugs in Framework Utilities
  • 83. Accidental Challenges: Bugs in Framework Utilities
  • 84. Accidental Challenges: Bugs in Framework Utilities adb shell shell /system/bin/uiautomator dump /sdcard/ui_dump.xml
  • 85. Accidental Challenges: Bugs in Framework Utilities adb shell shell /system/bin/uiautomator dump /sdcard/ui_dump.xml
  • 86. Accidental Challenges: Bugs in Framework Utilities adb shell shell /system/bin/uiautomator dump /sdcard/ui_dump.xml Solution: Modify Framework Components for the AOSP
  • 87. Accidental Challenges: Bugs and Limitations in the SDKTools adb Server 1 adb Server 2
  • 88. Accidental Challenges: Bugs and Limitations in the SDKTools adb Server 1 adb Server 2 No more than 15 devices per adb server instance!
  • 89. Accidental Challenges: Scaling ConcurrentVirtual Devices
  • 90. Accidental Challenges: Scaling ConcurrentVirtual Devices
  • 94. Enabling Large Scale Analysis: Execution Engine ✓Support for multiple maintenance tasks ✓Open/Closed principle ✓Horizontal/Vertical scalability ✓Asynchronous communication between clients and execution engine ✓Support for fragmentation Message bus Execution Engine Virtual devices (Pool)
  • 95. Enabling Large Scale Analysis: Execution Engine Dispatcher Worker Task Device/VM/ Thread token Task, Device/VM/ Thread token Task status, response Task status - Task-specific frameworks - Third party libraries <<invokes>> Client i Message Bus Local DB Client-specific technologies Request (i.e., new Task) Web folder or Content Delivery Network Images, files, etc.Images, files, etc. Response (i.e., Task results and status) Execution Engine (EE) EE Settings Devices/VMs pool Background Threads pool Clients Client n
  • 96. Enabling Large Scale Analysis: Execution Engine Dispatcher Worker Task Device/VM/ Thread token Task, Device/VM/ Thread token Task status, response Task status - Task-specific frameworks - Third party libraries <<invokes>> Client i Message Bus Local DB Client-specific technologies Request (i.e., new Task) Web folder or Content Delivery Network Images, files, etc.Images, files, etc. Response (i.e., Task results and status) Execution Engine (EE) EE Settings Devices/VMs pool Background Threads pool Clients Client n
  • 97. THANK YOU! Kevin Moran kpmoran@cs.wm.edu Mario Linares Vasquez m.linaresv@uniandes.edu.co Denys Poshyvanyk denys@cs.wm.edu http://www.research-appendix.com/android-testing