SlideShare a Scribd company logo
1 of 19
Strategies for coping with device fragmentation
About Bitbar  A technology company specialized in creating tools and environments for Android testing  Experience ranging from hosting the build and test process of the whole Android stack to creating custom application testing device clusters  Products: Testdroid Recorder and Testdroid Server
What problem are we solving?
Never able to log in! Uninstalling… Galaxy S Hung phone, drains power (Inspire) Real junk, although installed would not run Doesn’t work half of the time – HTC Evo Why is it important? Does not work on Motorola Zoom I cannot get this program to uninstall There seems to be more bugs than before update Xperia X10  - Widget doesn’t update and crashes all the time Could not connect using my Incredible
Approaches for managing this problem 1. Do nothing 2. Test manually every time you publish a new version 3. Outsource your manual testing to low cost countries 4. Automate your tests and run those on real  hardware every time the code is changed
Frameworks for automated Android testing Monkey – a random UI exerciser tool Monkeyrunner – Jython based test scripting tool  Robotium – It’s like Selenium but for Android   Roboelectric – Unit testing for Android applications  Cucumber – scenario based testing implemented in Ruby
Monkey  A UI/Application exerciser monkey for creating stream of random user events such as clicks, touches, gestures and some system level events   Useful way to stress test your application to find non-obvious usage patterns and corner cases  $ adb shell monkey -pyour.package.name -v 500
Monkeyrunner  An API toolkit for writing programs that control an Android device or emulator from outside of Android code # Runs the component device.startActivity(component=runComponent) # Presses the Menu button device.press('KEYCODE_MENU','DOWN_AND_UP') # Takes a screenshot result = device.takeSnapshot() # Writes the screenshot to a file result.writeToFile('myproject/shot1.png','png')
Robotium  Powerful and robust automatic black-box test cases for Android applications   Function, system and acceptance test scenarios spanning multiple Android activities @Smoke public void AddNewHudson() throws Exception { solo.clickOnText("Configuration"); 	solo.enterText(0, "hudson:8080"); 	solo.enterText(1, "hudson"); 	solo.clickOnImageButton(0); boolean expected = true; boolean actual = solo.searchText("(http://hudson:8080)");   assertEquals("Can't add new Hudson Instance", expected, actual); }
Roboelectric public class MyActivityTest {     private Activity activity;     private Button pressMeButton;     private TextView results;     @Before     public void setUp() throws Exception {         activity = new MyActivity(); activity.onCreate(null); pressMeButton = (Button) activity.findViewById(R.id.press_me_button);         results = (TextView) activity.findViewById(R.id.results_text_view);     }     @Test     public void shouldUpdateResultsWhenButtonIsClicked() throws Exception { pressMeButton.performClick();         String resultsText = results.getText().toString(); assertThat(resultsText, equalTo("Testing Android Rocks!"));     } }  Running unit tests on virtual machine – instead of running the tests on emulator or real device
Cucumber  Scenario based testing implemented in Ruby  Use cases are described in natural language where keywords are mapped to Android activities Given My ”TestExample" app is running   And I wait for "Do Androids Dream of Electric Sheep?" to appear   Then take picture   Then I press the menu key   Then take picture   And I select ”Options" from the menu   Then take picture   And I wait for "Enter text into input field" to appear   And I select "Enter text into input field"   And I wait for "Save new configuration" to appear   Then take picture
Running tests on Android InstrumentationTestRunner – the primary plumbing for running tests on Android  Android Debug Bridge (ADB) – connects the devices and manages all debug information flow  Asserts – rich validation capabilities enabled by JUnit. Helps validating test results, system outputs or practically anything.  Mock objects – methods for creating mock system objects such as content, service and intent.
Testing for device compliancy 1. Test only on real devices 2. Select at least one phone with each major Android release 3. Choose different form factors: Side sliders, tablets, small resolutions , large resolutions 4. Integrate test execution to your development process – catch failures early in development and notice regressions immediately
Some best practices  1. Application developers should create the test cases at the same time when they are writing the code 2. All test cases should be stored in version control – together with the source code   3. Use Continuous Integration and run the tests every time the code is changed  4. Avoid using emulators and rooted devices 5. Publish the test results to whole organization – real time
Typical failures  1. Application installation fails 2. Application crashes during execution 3. Scaling/Layout problems 4. Application hangs if some resource is not available 5. Problems in landscape/portrait mode
Our solution for multi device testing Testdroid Recorder An Eclipse plugin that automates the manual tasks of writing tests for Android applications Testdroid Server A server software that manages all aspects of automatically running tests on multiple Android devices simultaneously.
Demo (Video)
Questions?
Thank you!

More Related Content

What's hot

A guide to Android automated testing
A guide to Android automated testingA guide to Android automated testing
A guide to Android automated testingjotaemepereira
 
How to setup unit testing in Android Studio
How to setup unit testing in Android StudioHow to setup unit testing in Android Studio
How to setup unit testing in Android Studiotobiaspreuss
 
Different Android Test Automation Frameworks - What Works You the Best?
Different Android Test Automation Frameworks - What Works You the Best?Different Android Test Automation Frameworks - What Works You the Best?
Different Android Test Automation Frameworks - What Works You the Best?Bitbar
 
Learn How to Unit Test Your Android Application (with Robolectric)
Learn How to Unit Test Your Android Application (with Robolectric)Learn How to Unit Test Your Android Application (with Robolectric)
Learn How to Unit Test Your Android Application (with Robolectric)Marakana Inc.
 
Appium Mobile Testing: Nakov at BurgasConf - July 2021
Appium Mobile Testing: Nakov at BurgasConf - July 2021Appium Mobile Testing: Nakov at BurgasConf - July 2021
Appium Mobile Testing: Nakov at BurgasConf - July 2021Svetlin Nakov
 
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 AutomationTrent Peterson
 
Mobile App Testing ScanAgile 2012
Mobile App Testing ScanAgile 2012Mobile App Testing ScanAgile 2012
Mobile App Testing ScanAgile 2012Daniel Knott
 
Test Automation On Android Platform Using Robotium
Test Automation On Android Platform Using RobotiumTest Automation On Android Platform Using Robotium
Test Automation On Android Platform Using RobotiumIndicThreads
 
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
 
Automation Open Source tools
Automation Open Source toolsAutomation Open Source tools
Automation Open Source toolsQA Club Kiev
 
Testing android apps with espresso
Testing android apps with espressoTesting android apps with espresso
Testing android apps with espressoÉdipo Souza
 
Utilizando Espresso e UIAutomator no Teste de Apps Android
Utilizando Espresso e UIAutomator no Teste de Apps AndroidUtilizando Espresso e UIAutomator no Teste de Apps Android
Utilizando Espresso e UIAutomator no Teste de Apps AndroidEduardo Carrara de Araujo
 
How to Leverage Appium in Your Mobile App Testing
How to Leverage Appium in Your Mobile App TestingHow to Leverage Appium in Your Mobile App Testing
How to Leverage Appium in Your Mobile App TestingBitbar
 
Android automation tools
Android automation toolsAndroid automation tools
Android automation toolsSSGMCE SHEGAON
 
Fight back android fragmentation
Fight back android fragmentationFight back android fragmentation
Fight back android fragmentationBitbar
 
Head first android apps dev tools
Head first android apps dev toolsHead first android apps dev tools
Head first android apps dev toolsShaka Huang
 

What's hot (20)

A guide to Android automated testing
A guide to Android automated testingA guide to Android automated testing
A guide to Android automated testing
 
How to setup unit testing in Android Studio
How to setup unit testing in Android StudioHow to setup unit testing in Android Studio
How to setup unit testing in Android Studio
 
Different Android Test Automation Frameworks - What Works You the Best?
Different Android Test Automation Frameworks - What Works You the Best?Different Android Test Automation Frameworks - What Works You the Best?
Different Android Test Automation Frameworks - What Works You the Best?
 
Learn How to Unit Test Your Android Application (with Robolectric)
Learn How to Unit Test Your Android Application (with Robolectric)Learn How to Unit Test Your Android Application (with Robolectric)
Learn How to Unit Test Your Android Application (with Robolectric)
 
Robotium - sampath
Robotium - sampathRobotium - sampath
Robotium - sampath
 
Appium Mobile Testing: Nakov at BurgasConf - July 2021
Appium Mobile Testing: Nakov at BurgasConf - July 2021Appium Mobile Testing: Nakov at BurgasConf - July 2021
Appium Mobile Testing: Nakov at BurgasConf - July 2021
 
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
 
Mobile App Testing ScanAgile 2012
Mobile App Testing ScanAgile 2012Mobile App Testing ScanAgile 2012
Mobile App Testing ScanAgile 2012
 
Test Automation On Android Platform Using Robotium
Test Automation On Android Platform Using RobotiumTest Automation On Android Platform Using Robotium
Test Automation On Android Platform Using Robotium
 
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)
 
Android Test Automation Workshop
Android Test Automation WorkshopAndroid Test Automation Workshop
Android Test Automation Workshop
 
Automation Open Source tools
Automation Open Source toolsAutomation Open Source tools
Automation Open Source tools
 
Android Studio vs. ADT
Android Studio vs. ADTAndroid Studio vs. ADT
Android Studio vs. ADT
 
Testing android apps with espresso
Testing android apps with espressoTesting android apps with espresso
Testing android apps with espresso
 
Testing on Android
Testing on AndroidTesting on Android
Testing on Android
 
Utilizando Espresso e UIAutomator no Teste de Apps Android
Utilizando Espresso e UIAutomator no Teste de Apps AndroidUtilizando Espresso e UIAutomator no Teste de Apps Android
Utilizando Espresso e UIAutomator no Teste de Apps Android
 
How to Leverage Appium in Your Mobile App Testing
How to Leverage Appium in Your Mobile App TestingHow to Leverage Appium in Your Mobile App Testing
How to Leverage Appium in Your Mobile App Testing
 
Android automation tools
Android automation toolsAndroid automation tools
Android automation tools
 
Fight back android fragmentation
Fight back android fragmentationFight back android fragmentation
Fight back android fragmentation
 
Head first android apps dev tools
Head first android apps dev toolsHead first android apps dev tools
Head first android apps dev tools
 

Similar to Android testing

Getting started with appium
Getting started with appiumGetting started with appium
Getting started with appiumPratik Patel
 
Introduction To Mobile-Automation
Introduction To Mobile-AutomationIntroduction To Mobile-Automation
Introduction To Mobile-AutomationMindfire Solutions
 
Andriod dev toolbox part 2
Andriod dev toolbox  part 2Andriod dev toolbox  part 2
Andriod dev toolbox part 2Shem Magnezi
 
Benefits of using native automation tooling for mobile application testing.pptx
Benefits of using native automation tooling for mobile application testing.pptxBenefits of using native automation tooling for mobile application testing.pptx
Benefits of using native automation tooling for mobile application testing.pptxMesut Günes
 
Mobile applications and automation testing
Mobile applications and automation testingMobile applications and automation testing
Mobile applications and automation testingIndicThreads
 
Appium overview (Selenium Israel #2, Feb. 2014)
Appium overview (Selenium Israel #2, Feb. 2014)Appium overview (Selenium Israel #2, Feb. 2014)
Appium overview (Selenium Israel #2, Feb. 2014)danielputerman
 
Velocity Conference: Increasing Speed To Market In Mobile Development Through...
Velocity Conference: Increasing Speed To Market In Mobile Development Through...Velocity Conference: Increasing Speed To Market In Mobile Development Through...
Velocity Conference: Increasing Speed To Market In Mobile Development Through...Intuit Inc.
 
Testing in Android: automatici, di integrazione, TDD e scenari avanzati
Testing in Android: automatici, di integrazione, TDD e scenari avanzatiTesting in Android: automatici, di integrazione, TDD e scenari avanzati
Testing in Android: automatici, di integrazione, TDD e scenari avanzatiAlfredo Morresi
 
[Srijan Wednesday Webinar] Mastering Mobile Test Automation with Appium
[Srijan Wednesday Webinar] Mastering Mobile Test Automation with Appium[Srijan Wednesday Webinar] Mastering Mobile Test Automation with Appium
[Srijan Wednesday Webinar] Mastering Mobile Test Automation with AppiumSrijan Technologies
 
Phonegap Development & Debugging
Phonegap Development & DebuggingPhonegap Development & Debugging
Phonegap Development & DebuggingIvano Malavolta
 
Testing Android Application, Droidcon Torino
Testing Android Application, Droidcon TorinoTesting Android Application, Droidcon Torino
Testing Android Application, Droidcon TorinoPietro Alberto Rossi
 
A. Sirota "Building an Automation Solution based on Appium"
A. Sirota "Building an Automation Solution based on Appium"A. Sirota "Building an Automation Solution based on Appium"
A. Sirota "Building an Automation Solution based on Appium"DataArt
 
Introduction_to_android_and_android_studio
Introduction_to_android_and_android_studioIntroduction_to_android_and_android_studio
Introduction_to_android_and_android_studioAbdul Basit
 
Do You Enjoy Espresso in Android App Testing?
Do You Enjoy Espresso in Android App Testing?Do You Enjoy Espresso in Android App Testing?
Do You Enjoy Espresso in Android App Testing?Bitbar
 

Similar to Android testing (20)

Unit Testing in Android
Unit Testing in AndroidUnit Testing in Android
Unit Testing in Android
 
Getting started with appium
Getting started with appiumGetting started with appium
Getting started with appium
 
Introduction To Mobile-Automation
Introduction To Mobile-AutomationIntroduction To Mobile-Automation
Introduction To Mobile-Automation
 
Android wear notes
Android wear notesAndroid wear notes
Android wear notes
 
Android wear notes
Android wear notesAndroid wear notes
Android wear notes
 
Andriod dev toolbox part 2
Andriod dev toolbox  part 2Andriod dev toolbox  part 2
Andriod dev toolbox part 2
 
Android testing part i
Android testing part iAndroid testing part i
Android testing part i
 
Benefits of using native automation tooling for mobile application testing.pptx
Benefits of using native automation tooling for mobile application testing.pptxBenefits of using native automation tooling for mobile application testing.pptx
Benefits of using native automation tooling for mobile application testing.pptx
 
Mobile applications and automation testing
Mobile applications and automation testingMobile applications and automation testing
Mobile applications and automation testing
 
Appium overview (Selenium Israel #2, Feb. 2014)
Appium overview (Selenium Israel #2, Feb. 2014)Appium overview (Selenium Israel #2, Feb. 2014)
Appium overview (Selenium Israel #2, Feb. 2014)
 
Velocity Conference: Increasing Speed To Market In Mobile Development Through...
Velocity Conference: Increasing Speed To Market In Mobile Development Through...Velocity Conference: Increasing Speed To Market In Mobile Development Through...
Velocity Conference: Increasing Speed To Market In Mobile Development Through...
 
Testing in Android: automatici, di integrazione, TDD e scenari avanzati
Testing in Android: automatici, di integrazione, TDD e scenari avanzatiTesting in Android: automatici, di integrazione, TDD e scenari avanzati
Testing in Android: automatici, di integrazione, TDD e scenari avanzati
 
UIAutomator
UIAutomatorUIAutomator
UIAutomator
 
[Srijan Wednesday Webinar] Mastering Mobile Test Automation with Appium
[Srijan Wednesday Webinar] Mastering Mobile Test Automation with Appium[Srijan Wednesday Webinar] Mastering Mobile Test Automation with Appium
[Srijan Wednesday Webinar] Mastering Mobile Test Automation with Appium
 
Phonegap Development & Debugging
Phonegap Development & DebuggingPhonegap Development & Debugging
Phonegap Development & Debugging
 
Testing Android Application, Droidcon Torino
Testing Android Application, Droidcon TorinoTesting Android Application, Droidcon Torino
Testing Android Application, Droidcon Torino
 
A. Sirota "Building an Automation Solution based on Appium"
A. Sirota "Building an Automation Solution based on Appium"A. Sirota "Building an Automation Solution based on Appium"
A. Sirota "Building an Automation Solution based on Appium"
 
Introduction_to_android_and_android_studio
Introduction_to_android_and_android_studioIntroduction_to_android_and_android_studio
Introduction_to_android_and_android_studio
 
Android tutorial1
Android tutorial1Android tutorial1
Android tutorial1
 
Do You Enjoy Espresso in Android App Testing?
Do You Enjoy Espresso in Android App Testing?Do You Enjoy Espresso in Android App Testing?
Do You Enjoy Espresso in Android App Testing?
 

More from Bitbar

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

More from Bitbar (17)

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

Recently uploaded

Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Commit University
 
The State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptxThe State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptxLoriGlavin3
 
Rise of the Machines: Known As Drones...
Rise of the Machines: Known As Drones...Rise of the Machines: Known As Drones...
Rise of the Machines: Known As Drones...Rick Flair
 
How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.Curtis Poe
 
Gen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfGen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfAddepto
 
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsSergiu Bodiu
 
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
 
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024BookNet Canada
 
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
 
Moving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdfMoving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdfLoriGlavin3
 
Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebUiPathCommunity
 
What is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdfWhat is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdfMounikaPolabathina
 
SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024Lorenzo Miniero
 
"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii SoldatenkoFwdays
 
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
 
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024BookNet Canada
 
SALESFORCE EDUCATION CLOUD | FEXLE SERVICES
SALESFORCE EDUCATION CLOUD | FEXLE SERVICESSALESFORCE EDUCATION CLOUD | FEXLE SERVICES
SALESFORCE EDUCATION CLOUD | FEXLE SERVICESmohitsingh558521
 
Sample pptx for embedding into website for demo
Sample pptx for embedding into website for demoSample pptx for embedding into website for demo
Sample pptx for embedding into website for demoHarshalMandlekar2
 
Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfUnraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfAlex Barbosa Coqueiro
 
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxMerck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxLoriGlavin3
 

Recently uploaded (20)

Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!
 
The State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptxThe State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptx
 
Rise of the Machines: Known As Drones...
Rise of the Machines: Known As Drones...Rise of the Machines: Known As Drones...
Rise of the Machines: Known As Drones...
 
How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.
 
Gen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfGen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdf
 
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platforms
 
From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .
 
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
 
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
 
Moving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdfMoving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdf
 
Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio Web
 
What is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdfWhat is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdf
 
SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024
 
"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko
 
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
 
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
 
SALESFORCE EDUCATION CLOUD | FEXLE SERVICES
SALESFORCE EDUCATION CLOUD | FEXLE SERVICESSALESFORCE EDUCATION CLOUD | FEXLE SERVICES
SALESFORCE EDUCATION CLOUD | FEXLE SERVICES
 
Sample pptx for embedding into website for demo
Sample pptx for embedding into website for demoSample pptx for embedding into website for demo
Sample pptx for embedding into website for demo
 
Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfUnraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdf
 
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxMerck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
 

Android testing

  • 1. Strategies for coping with device fragmentation
  • 2. About Bitbar A technology company specialized in creating tools and environments for Android testing Experience ranging from hosting the build and test process of the whole Android stack to creating custom application testing device clusters Products: Testdroid Recorder and Testdroid Server
  • 3. What problem are we solving?
  • 4. Never able to log in! Uninstalling… Galaxy S Hung phone, drains power (Inspire) Real junk, although installed would not run Doesn’t work half of the time – HTC Evo Why is it important? Does not work on Motorola Zoom I cannot get this program to uninstall There seems to be more bugs than before update Xperia X10 - Widget doesn’t update and crashes all the time Could not connect using my Incredible
  • 5. Approaches for managing this problem 1. Do nothing 2. Test manually every time you publish a new version 3. Outsource your manual testing to low cost countries 4. Automate your tests and run those on real hardware every time the code is changed
  • 6. Frameworks for automated Android testing Monkey – a random UI exerciser tool Monkeyrunner – Jython based test scripting tool Robotium – It’s like Selenium but for Android Roboelectric – Unit testing for Android applications Cucumber – scenario based testing implemented in Ruby
  • 7. Monkey A UI/Application exerciser monkey for creating stream of random user events such as clicks, touches, gestures and some system level events Useful way to stress test your application to find non-obvious usage patterns and corner cases $ adb shell monkey -pyour.package.name -v 500
  • 8. Monkeyrunner An API toolkit for writing programs that control an Android device or emulator from outside of Android code # Runs the component device.startActivity(component=runComponent) # Presses the Menu button device.press('KEYCODE_MENU','DOWN_AND_UP') # Takes a screenshot result = device.takeSnapshot() # Writes the screenshot to a file result.writeToFile('myproject/shot1.png','png')
  • 9. Robotium Powerful and robust automatic black-box test cases for Android applications Function, system and acceptance test scenarios spanning multiple Android activities @Smoke public void AddNewHudson() throws Exception { solo.clickOnText("Configuration"); solo.enterText(0, "hudson:8080"); solo.enterText(1, "hudson"); solo.clickOnImageButton(0); boolean expected = true; boolean actual = solo.searchText("(http://hudson:8080)"); assertEquals("Can't add new Hudson Instance", expected, actual); }
  • 10. Roboelectric public class MyActivityTest { private Activity activity; private Button pressMeButton; private TextView results; @Before public void setUp() throws Exception { activity = new MyActivity(); activity.onCreate(null); pressMeButton = (Button) activity.findViewById(R.id.press_me_button); results = (TextView) activity.findViewById(R.id.results_text_view); } @Test public void shouldUpdateResultsWhenButtonIsClicked() throws Exception { pressMeButton.performClick(); String resultsText = results.getText().toString(); assertThat(resultsText, equalTo("Testing Android Rocks!")); } } Running unit tests on virtual machine – instead of running the tests on emulator or real device
  • 11. Cucumber Scenario based testing implemented in Ruby Use cases are described in natural language where keywords are mapped to Android activities Given My ”TestExample" app is running And I wait for "Do Androids Dream of Electric Sheep?" to appear Then take picture Then I press the menu key Then take picture And I select ”Options" from the menu Then take picture And I wait for "Enter text into input field" to appear And I select "Enter text into input field" And I wait for "Save new configuration" to appear Then take picture
  • 12. Running tests on Android InstrumentationTestRunner – the primary plumbing for running tests on Android Android Debug Bridge (ADB) – connects the devices and manages all debug information flow Asserts – rich validation capabilities enabled by JUnit. Helps validating test results, system outputs or practically anything. Mock objects – methods for creating mock system objects such as content, service and intent.
  • 13. Testing for device compliancy 1. Test only on real devices 2. Select at least one phone with each major Android release 3. Choose different form factors: Side sliders, tablets, small resolutions , large resolutions 4. Integrate test execution to your development process – catch failures early in development and notice regressions immediately
  • 14. Some best practices 1. Application developers should create the test cases at the same time when they are writing the code 2. All test cases should be stored in version control – together with the source code 3. Use Continuous Integration and run the tests every time the code is changed 4. Avoid using emulators and rooted devices 5. Publish the test results to whole organization – real time
  • 15. Typical failures 1. Application installation fails 2. Application crashes during execution 3. Scaling/Layout problems 4. Application hangs if some resource is not available 5. Problems in landscape/portrait mode
  • 16. Our solution for multi device testing Testdroid Recorder An Eclipse plugin that automates the manual tasks of writing tests for Android applications Testdroid Server A server software that manages all aspects of automatically running tests on multiple Android devices simultaneously.