SlideShare ist ein Scribd-Unternehmen logo
1 von 45
Testing for Android & iOS
When, Where, and How to
Successfully Use Test
Automation
Trent Peterson | @tdpeterson | trent@appthwack.com
Who?
AGENDA
What is testing?
What’s the problem?
Why should I care?
When: Choosing our battles
Where: Best Practices
How: Tools & Frameworks
Q&A
INTRO TO TESTING
Types of tests
•
•
•
•
•
•
•
•

Functional
Non-functional
Integration
Unit
Regression
Smoke
Usability
Performance

• Stress
• Acceptance
• Load
• Sanity
• End-to-End
• System
• Security
And on and on…
Testing distilled for this discussion

Functional Testing
Non-functional Testing
THE PROBLEM
Building things is hard.
WHY SHOULD I CARE?
So what’s the big deal?

1,000,000+ apps in
1,000,000+ apps in

2 crashes and 84% will uninstall
- Compuware as reported in TechCrunch
We’ve been here before.
CHOOSING OUR BATTLES
First, what’s our goal?

Save time!
BE REALISTIC
Save money!
• Increase regularity of testing
Shrink QA!

• Free up resources for other testing efforts
• Enable previously impossible tests
AUTOMATE
EVERYTHING
!
Deciding what to automate

How often will I test this?
Is this something a human is good at?
How much effort will automation require?
Some examples
AUTOMATE

MANUAL

• Granular functionality
(unit tests)
• Repetitive tasks
(update
paths, navigation, etc.)
• Performance

• UX
• Responsiveness and
“feel”
• New functionality
Our options (Machine)
JVM

Emulators

Real Devices

• FAST
• Unit tests
only*
• Mocks

• Cheap
• Catch layout
issues
• Simulate
calls/SMS
• SLOW
• Illusion of 1:1
with real
devices

• Exactly what end
customers use
• Performance data
• Fast
• Expensive:
Purchase, maintai
n, etc.
Our options (Human)
QA

Crowd

End Users

• Pros
• Real
feedback
• Know the
product
• Expensive

• Real feedback
• Might know
product
• Expensive
(usually)
• Slow

• Don’t do this.
BEST PRACTICES
No barriers between Dev & QA
Automation is a software project
Automation is a tool, not a solution
Automate with precision
It’s all about data
Know your matrix
Abstraction is important

…but don’t obsess
TOOLS and FRAMEWORKS
Tool: Recorders
GOOD

BAD

• Fast
• Non-developers can
create tests

• Fragile
• Difficult to maintain
• Non-developers can
create tests

BEST PRACTICE
• Treat as a fancy spy
Tool: UI Exerciser Monkey
$ adb shell monkey
–p my.sweet.app –v 1000
Framework: Android Testing
SUMMARY
• JUnit/Java
• Instrumentation provides hooks into Android
SDK to control Android-specific functionality
• Very basic functionality supported
• The foundation for most Android testing. Learn
it, use it, love it.
Framework: Robolectric
SUMMARY
• JUnit
• Runs in JVM
• Mocks Android functionality with “shadow”
objects
• Super fast
• Not everything is mocked (also, mocks)
• Great for staying sane while developing
Framework: UI Automator
SUMMARY
• JUnit/Java
• Extends testing framework with UI selectors
and manipulators
• Handle/control system dialogs, etc
• 4.1+ only
• Excellent choice if you have the luxury of
supporting 4.1+.
Framework: Espresso
SUMMARY
• JUnit/Java
• Extends testing framework with UI selectors
and manipulators
• Removes boilerplate code (sleeps, etc)
• Very new and unstable
• If you’re feeling adventurous give it a try
Framework: Robotium
SUMMARY
• JUnit extension
• Runs on emulators and real devices
• Oriented towards black-box testing and
ensuring real-world outcomes
• Limited to the app under test

• Great choice for developers going beyond
basic unit testing and testing UI.
Framework: Cucumber-based
SUMMARY
• Human-readable tests
• Runs on emulators and real devices
• Cross-platform
• Complex scenarios require development
• Behavior-driven design. Be careful!
• Great choice for simple flows and teams with
limited developer resources.
Framework: Appium
SUMMARY
• Supports many language adapters
• Runs on emulators and real devices
• Cross-platform
• New, and not all WebDriver concepts map
intuitively to native apps
• Great choice for teams happy with Selenium
and expanding to native.
Framework: UI Automation
SUMMARY
•
•
•
•

JavaScript
Installs with Xcode
Functions with other instruments
Has a recorder (Careful)

• Dev/maintenance of JS

• Good choice to get basic tests up and running
quickly.
Framework: XCTest
SUMMARY
• Objective C
• Installs with Xcode
• Poor documentation
• Obvious choice for unit testing.
Framework: KIF
SUMMARY
• Objective C
• Enables functional test automation capabilities
by providing UI helpers
• Relies on undocumented APIs
• Great choice for devs automating functional
tests.
Tool: Spoon

Spoon

Instrumentation Tests
Tool: Bots

Continuous Integration
Execute tests, etc.
Frameworks: Commercial
GOOD

BAD

• Support
• Added features and
integrations
• Longevity?

• Proprietary
• Often heavy and
difficult to maintain
• $$$

ADVICE
• Evaluate very carefully and acknowledge lock-in.
When choosing, ask…

What are we testing?
What are our automation goals?

Who will write the automated tests?
SHAMELESS PLUG
AppThwack
•
•
•
•

100s of non-rooted devices
Results in minutes
Built-in compatibility tests
Supports all popular
automation frameworks
• Simple API and integrations
• Focused, comprehensive
reports
Q&A
Trent Peterson | @tdpeterson | trent@appthwack.com

Weitere ähnliche Inhalte

Was ist angesagt?

SauceCon 2017: Building a Continuous Delivery Pipeline with Testing in Mind
SauceCon 2017: Building a Continuous Delivery Pipeline with Testing in MindSauceCon 2017: Building a Continuous Delivery Pipeline with Testing in Mind
SauceCon 2017: Building a Continuous Delivery Pipeline with Testing in Mind
Sauce Labs
 
Continuous, Evolutionary and Large-Scale: A New Perspective for Automated Mob...
Continuous, Evolutionary and Large-Scale: A New Perspective for Automated Mob...Continuous, Evolutionary and Large-Scale: A New Perspective for Automated Mob...
Continuous, Evolutionary and Large-Scale: A New Perspective for Automated Mob...
Kevin Moran
 

Was ist angesagt? (18)

Building High Quality Android Applications
Building High Quality Android ApplicationsBuilding High Quality Android Applications
Building High Quality Android Applications
 
SauceCon 2017: Making Your Mobile App Automatable
SauceCon 2017: Making Your Mobile App AutomatableSauceCon 2017: Making Your Mobile App Automatable
SauceCon 2017: Making Your Mobile App Automatable
 
Advanced Appium: SeleniumConf UK 2016
Advanced Appium: SeleniumConf UK 2016Advanced Appium: SeleniumConf UK 2016
Advanced Appium: SeleniumConf UK 2016
 
10 Benefits of Automated Testing
10 Benefits of Automated Testing10 Benefits of Automated Testing
10 Benefits of Automated Testing
 
ISTQB Foundation and Selenium Java Automation Testing
ISTQB Foundation and Selenium Java Automation TestingISTQB Foundation and Selenium Java Automation Testing
ISTQB Foundation and Selenium Java Automation Testing
 
Eclipse Day India 2015 - Eclipse RCP testing using Jubula based automation
Eclipse Day India 2015 - Eclipse RCP testing using Jubula based automationEclipse Day India 2015 - Eclipse RCP testing using Jubula based automation
Eclipse Day India 2015 - Eclipse RCP testing using Jubula based automation
 
Wix automation
Wix automationWix automation
Wix automation
 
How to Leverage XCUITest for Continuous Testing
How to Leverage XCUITest for Continuous TestingHow to Leverage XCUITest for Continuous Testing
How to Leverage XCUITest for Continuous Testing
 
Myth vs Reality: Understanding AI/ML for QA Automation - w/ Jonathan Lipps
Myth vs Reality: Understanding AI/ML for QA Automation - w/ Jonathan LippsMyth vs Reality: Understanding AI/ML for QA Automation - w/ Jonathan Lipps
Myth vs Reality: Understanding AI/ML for QA Automation - w/ Jonathan Lipps
 
Testing NodeJS, REST APIs and MongoDB with UFT
Testing NodeJS, REST APIs and MongoDB with UFTTesting NodeJS, REST APIs and MongoDB with UFT
Testing NodeJS, REST APIs and MongoDB with UFT
 
SauceCon 2017: Building a Continuous Delivery Pipeline with Testing in Mind
SauceCon 2017: Building a Continuous Delivery Pipeline with Testing in MindSauceCon 2017: Building a Continuous Delivery Pipeline with Testing in Mind
SauceCon 2017: Building a Continuous Delivery Pipeline with Testing in Mind
 
Advanced Cross-Browser Visual Testing with Applitools Eyes and HP LeanFT
Advanced Cross-Browser Visual Testing with Applitools Eyes and HP LeanFTAdvanced Cross-Browser Visual Testing with Applitools Eyes and HP LeanFT
Advanced Cross-Browser Visual Testing with Applitools Eyes and HP LeanFT
 
Live Panel: Appium Core Committers Answer Your Questions
Live Panel: Appium Core Committers Answer Your Questions		Live Panel: Appium Core Committers Answer Your Questions
Live Panel: Appium Core Committers Answer Your Questions
 
How we've built Yahoo Fantasy Football (Droidcon Italy '15)
How we've built Yahoo Fantasy Football (Droidcon Italy '15)How we've built Yahoo Fantasy Football (Droidcon Italy '15)
How we've built Yahoo Fantasy Football (Droidcon Italy '15)
 
SauceCon 2017: test.allTheThings(): Digital Edition
SauceCon 2017: test.allTheThings(): Digital EditionSauceCon 2017: test.allTheThings(): Digital Edition
SauceCon 2017: test.allTheThings(): Digital Edition
 
Real Devices or Emulators: Wen to use What for Automated Testing
Real Devices or Emulators: Wen to use What for Automated TestingReal Devices or Emulators: Wen to use What for Automated Testing
Real Devices or Emulators: Wen to use What for Automated Testing
 
Continuous, Evolutionary and Large-Scale: A New Perspective for Automated Mob...
Continuous, Evolutionary and Large-Scale: A New Perspective for Automated Mob...Continuous, Evolutionary and Large-Scale: A New Perspective for Automated Mob...
Continuous, Evolutionary and Large-Scale: A New Perspective for Automated Mob...
 
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...
 

Ähnlich wie When & How to Successfully use Test Automation for Mobile Applications

Introduction to-automated-testing
Introduction to-automated-testingIntroduction to-automated-testing
Introduction to-automated-testing
BestBrains
 

Ähnlich wie When & How to Successfully use Test Automation for Mobile Applications (20)

Testing for Android: When, Where, and How to Successfully Use Test Automation
Testing for Android: When, Where, and How to Successfully Use Test AutomationTesting for Android: When, Where, and How to Successfully Use Test Automation
Testing for Android: When, Where, and How to Successfully Use Test Automation
 
Tools for Software Testing
Tools for Software TestingTools for Software Testing
Tools for Software Testing
 
5 Steps to Jump Start Your Test Automation
5 Steps to Jump Start Your Test Automation5 Steps to Jump Start Your Test Automation
5 Steps to Jump Start Your Test Automation
 
Reliable mobile test automation
Reliable mobile test automationReliable mobile test automation
Reliable mobile test automation
 
Testing Best Practices
Testing Best PracticesTesting Best Practices
Testing Best Practices
 
Best Practices in Mobile CI (webinar)
Best Practices in Mobile CI (webinar)Best Practices in Mobile CI (webinar)
Best Practices in Mobile CI (webinar)
 
Use Jenkins For Continuous Load Testing And Mobile Test Automation
Use Jenkins For Continuous Load Testing And Mobile Test AutomationUse Jenkins For Continuous Load Testing And Mobile Test Automation
Use Jenkins For Continuous Load Testing And Mobile Test Automation
 
How do Developers Test Android Applications?
How do Developers Test Android Applications?How do Developers Test Android Applications?
How do Developers Test Android Applications?
 
Continuous Integration, Deploy, Test From Beginning To End 2014
Continuous Integration, Deploy, Test From Beginning To End 2014Continuous Integration, Deploy, Test From Beginning To End 2014
Continuous Integration, Deploy, Test From Beginning To End 2014
 
Software testing
Software testingSoftware testing
Software testing
 
STARWest: Use Jenkins For Continuous 
Load Testing And Mobile Test Automation
STARWest: Use Jenkins For Continuous 
Load Testing And Mobile Test AutomationSTARWest: Use Jenkins For Continuous 
Load Testing And Mobile Test Automation
STARWest: Use Jenkins For Continuous 
Load Testing And Mobile Test Automation
 
Thomas Haver - Mobile Testing.pdf
Thomas Haver - Mobile Testing.pdfThomas Haver - Mobile Testing.pdf
Thomas Haver - Mobile Testing.pdf
 
Web Automation Testing for developers?
Web Automation Testing for developers?Web Automation Testing for developers?
Web Automation Testing for developers?
 
Real Testing Scenario Strategy Practical TestOps Presentation
Real Testing Scenario Strategy Practical TestOps PresentationReal Testing Scenario Strategy Practical TestOps Presentation
Real Testing Scenario Strategy Practical TestOps Presentation
 
Introduction to Automated Testing
Introduction to Automated TestingIntroduction to Automated Testing
Introduction to Automated Testing
 
Introduction to-automated-testing
Introduction to-automated-testingIntroduction to-automated-testing
Introduction to-automated-testing
 
Mobile Automation Meetup Presentation [English]
Mobile Automation Meetup Presentation [English]Mobile Automation Meetup Presentation [English]
Mobile Automation Meetup Presentation [English]
 
4&5.pptx SOFTWARE TESTING UNIT-4 AND UNIT-5
4&5.pptx SOFTWARE TESTING UNIT-4 AND UNIT-54&5.pptx SOFTWARE TESTING UNIT-4 AND UNIT-5
4&5.pptx SOFTWARE TESTING UNIT-4 AND UNIT-5
 
Testing API's: Tools & Tips & Tricks (Oh My!)
Testing API's: Tools & Tips & Tricks (Oh My!)Testing API's: Tools & Tips & Tricks (Oh My!)
Testing API's: Tools & Tips & Tricks (Oh My!)
 
Client Side Unit Testing
Client Side Unit TestingClient Side Unit Testing
Client Side Unit Testing
 

Kürzlich hochgeladen

Kürzlich hochgeladen (20)

Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
 
FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024
 
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, ...
 
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
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of Terraform
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)
 
AXA XL - Insurer Innovation Award Americas 2024
AXA XL - Insurer Innovation Award Americas 2024AXA XL - Insurer Innovation Award Americas 2024
AXA XL - Insurer Innovation Award Americas 2024
 
MS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectorsMS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectors
 
Navi Mumbai Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Navi Mumbai Call Girls 🥰 8617370543 Service Offer VIP Hot ModelNavi Mumbai Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Navi Mumbai Call Girls 🥰 8617370543 Service Offer VIP Hot Model
 
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
 
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
 
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
 
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ..."I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 
Apidays Singapore 2024 - Modernizing Securities Finance by Madhu Subbu
Apidays Singapore 2024 - Modernizing Securities Finance by Madhu SubbuApidays Singapore 2024 - Modernizing Securities Finance by Madhu Subbu
Apidays Singapore 2024 - Modernizing Securities Finance by Madhu Subbu
 
Ransomware_Q4_2023. The report. [EN].pdf
Ransomware_Q4_2023. The report. [EN].pdfRansomware_Q4_2023. The report. [EN].pdf
Ransomware_Q4_2023. The report. [EN].pdf
 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...
 
GenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdfGenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdf
 

When & How to Successfully use Test Automation for Mobile Applications

Hinweis der Redaktion

  1. Picture courtesy of http://www.flickr.com/photos/schrierc/ (Creative Commons Attribution 2.0 Generic)
  2. Picture courtesy of http://www.flickr.com/photos/conbon/ (Creative Commons Attribution 2.0 Generic)
  3. Programming image by http://www.flickr.com/photos/riebart/ (Creative Commons Attribution 2.0 Generic)
  4. TechCrunch article: http://techcrunch.com/2013/03/12/users-have-low-tolerance-for-buggy-apps-only-16-will-try-a-failing-app-more-than-twice/Trash can by Yellow Icon Design (http://www.yellowicon.com/) under GPU General Public License
  5. Picture courtesy of http://www.flickr.com/photos/mulad/ (Creative Commons Attribution 2.0 Generic)
  6. Suit image by http://www.flickr.com/photos/charlesfettinger/ (Creative Commons Attribution 2.0 Generic)
  7. Picture courtesy of http://www.flickr.com/photos/wwarby/ (Creative Commons Attribution 2.0 Generic)
  8. Wall image by http://www.flickr.com/photos/easylocum/ (Creative Commons Attribution 2.0 Generic)
  9. Wall image by http://www.flickr.com/photos/riebart/ (Creative Commons Attribution 2.0 Generic)
  10. Wall image by http://www.flickr.com/photos/zomgitsbrian/ (Creative Commons Attribution 2.0 Generic)
  11. Wall image by http://www.flickr.com/photos/andreweason/ (Creative Commons Attribution 2.0 Generic)
  12. Data image by http://www.flickr.com/photos/tensafefrogs/ (Creative Commons Attribution 2.0 Generic)
  13. Wall image by http://www.flickr.com/photos/riebart/ (Creative Commons Attribution 2.0 Generic)
  14. Wall image by http://www.flickr.com/photos/carbonnyc/ (Creative Commons Attribution 2.0 Generic)
  15. Security image by http://www.flickr.com/photos/zigazou76/ (Creative Commons Attribution 2.0 Generic)
  16. http://developer.android.com/tools/help/monkey.html
  17. http://developer.android.com/tools/testing/testing_android.html
  18. http://robolectric.org
  19. http://developer.android.com/tools/testing/testing_ui.html
  20. https://code.google.com/p/android-test-kit/
  21. https://code.google.com/p/robotium/
  22. http://appium.io/
  23. https://developer.apple.com/library/ios/documentation/DeveloperTools/Conceptual/InstrumentsUserGuide/UsingtheAutomationInstrument/UsingtheAutomationInstrument.html
  24. https://developer.apple.com/library/ios/documentation/ToolsLanguages/Conceptual/Xcode_Overview/UnitTestYourApp/UnitTestYourApp.html
  25. https://github.com/kif-framework/KIF
  26. http://square.github.io/spoon/
  27. https://developer.apple.com/library/ios/documentation/IDEs/Conceptual/xcode_guide-continuous_integration/000-About_Continuous_Integration/about_continuous_integration.html#//apple_ref/doc/uid/TP40013292
  28. Chains image by http://www.flickr.com/photos/colinsd40/ (Creative Commons Attribution 2.0 Generic)
  29. Surgical tools image by http://www.flickr.com/photos/wien/ (Creative Commons Attribution 2.0 Generic)
  30. https://appthwack.com