SlideShare a Scribd company logo
1 of 69
Download to read offline
© mutualmobile
SYSTEMTESTING WITH ROBOTIUM
Why,What,When,Where and How
© mutualmobile
WHO AM I?
Elliott Chenger

Android Engineer @ Mutual Mobile	

@echenger erchenger
• Likes
• Long walks on the
beach	

• Everything Android	

• Ice Hockey	

• Auburn	

• Cars
• Dislikes
• the F word
(fragmentation)	

• when carriers delay
software updates	

• King Joffery from
GOT	

• I-35 traffic
© mutualmobile
AGENDA
• Brief overview of different types
ofTesting	

• What value does system testing
add?	

• Different tools for system testing	

• What we chose and why.	

• Do’s and Don’ts to system
testing	

• How to write system tests	

• Live Demo	

• Q&A
© mutualmobile
DIFFERENTTYPES OFTESTING
White Box
• Tests code for precision and
correctness	

• Tester understands and is testing
internal structure and design of
software	

• Generally Unit and Integration testing
Black Box
• Software internal structure is not
known to the tester	

• Mainly done through acceptance and
system testing	

• Tests are based on requirements
© mutualmobile
WHAT IS SYSTEMTESTING?
© mutualmobile
SYSTEMTESTING	

• Subset of Black BoxTesting	

• Tests software as a whole to make
sure it meets specified requirements	

• Defined by acceptance criteria	

• Mimics the human
© mutualmobile
WHY SHOULD A DEVELOPER WRITE
SYSTEMTESTS?
© mutualmobile
© mutualmobile
SYSTEMTESTINGTOOLS
• Robotium	

• Espresso	

• MonkeyTalk	

• UIAutomator
© mutualmobile
WHY WE CHOSE ROBOTIUM?
• Written in Java and structured like JUnit
tests	

• Bootstrapping was easy	

• Allows us to write tests that mimic
what a human does	

• Strong community support
© mutualmobile
PROCESS/ACTIVITIES
• The project kicks off and a full audit of all current system testing tools is performed.	

• After a month of reviewing various tools Robotium becomes the clear selection among all of the
stakeholders.	

• A machine was purchased to be used as our testing server.	

• The script and boiler plate for testing was created.	

• Through trial and error our script and the server became more stable.	

• We switched from emulators to physical devices and we decided that Flow testing will be more
beneficial instead of screen testing.
© mutualmobile
• Worked with QA to identify how we are going to capture tests and
communicate what should and shouldn’t be tested. 	

• We started a pilot program for Robotium on two major projects.	

• Much was learned about how we actually write these tests.	

• Now we are going through the process of educating and advocating our
department to add system testing into our normal development process
© mutualmobile
LESSONS LEARNED
© mutualmobile
AUTOMATE
Let Continuous Integration systems do
the heavy lifting for you.This will help you
catch issues before it gets into QA’s
hands.
© mutualmobile
USE PHYSICAL
DEVICES
We have found through testing that
Android emulators are simply slow and
unreliable.Another benefit is being able
to test on different device subsets.
© mutualmobile
WRITETESTSTHAT
MIMIC A HUMAN
Put yourself in the user’s shoes, don’t get
hung up testing pieces of the UI directly.
Thinking this way makes your tests more
stable and more valuable to QA and your
customer.
© mutualmobile
DON’T STRIVE FOR
100% COVERAGE
Strive for good tests, not a certain
quantity of test coverage. Beware of
writing tests just to have tests. Like most
things SystemTesting has a time and a
place.
© mutualmobile
SCREENTESTING 	

VS 	

FLOWTESTING
© mutualmobile
SCREENTESTING
© mutualmobile
FLOWTESTING
© mutualmobile
CODE
The fun part
© mutualmobile
OUR EXAMPLE APP
© mutualmobile
AGENDA
• Setting up Robotium in a project	

• Organizing your tests	

• Boilerplate code	

• Writing tests	

• RunningTests	

• Live Demo
© mutualmobile
SETTING UP ROBOTIUM WITH ECLIPSE
• Download jar

https://code.google.com/p/robotium/
© mutualmobile
SETTING UP ROBOTIUM GENERIC
• Download jar

https://code.google.com/p/robotium/	

• Add the jar to your classpath
© mutualmobile
SETTING UPTHE MANIFEST
© mutualmobile
BOILER PLATE
© mutualmobile
WRITINGYOU FIRSTTEST
© mutualmobile
BEFORE WE START DO’S AND DON’TS
• DO write tests that mimic a human.	

• DO write your tests to encompass the overall acceptance criteria	

• Assert DO NOT assume (also follow assertions with detailed error
messages)	

• DO NOT depend on time.

Example: Don’t assume a REST call will always take 2 seconds.
© mutualmobile
LET’STEST A STORY
• User Story:As a user I would like to be able to login to the app, so that I can see the next
screen	

• Acceptance Criteria	

• Button for logging in	

• A place for the user to enter their name for logging in.	

• Once they enter their name and click the log in button they go to the next screen. 	

• If they don’t enter a name they get an error dialog
© mutualmobile
SO FAR
• We have written tests for the happy
path for testing login.	

• We have an Activity that has visuals but
nothing else in it.
© mutualmobile
LET’S NOW RUNTHETESTS
© mutualmobile
NOW CODEYOUR FEATURETO MAKE
THETESTS GO GREEN
© mutualmobile
NOW WE CAN WRITE SOME SAD PATH
TESTS
© mutualmobile
NOW
• We have written happy path tests and
they are successful.	

• We just finished writing our sad path
tests and they should not pass.	

• We have an Activity that has visuals and
some of our interactions but we still
need to code the rest of the sad path
test.
© mutualmobile
NOW CODEYOURTESTSTO GO GREEN
ANDYOU ARE DONE!
© mutualmobile
LIVE DEMO
© mutualmobile
WHATS NEXT?
• Go explore: https://code.google.com/p/robotium/	

• Download the example app code for this presentation: 

http://goo.gl/WPkwNE	

• Have questions or feedback? 

elliott.chenger@mutualmobile.com or @echenger
© mutualmobile
Q&A

More Related Content

Viewers also liked

How to configure monkey talk android agent
How to configure monkey talk android agentHow to configure monkey talk android agent
How to configure monkey talk android agentDasun Eranthika
 
Exploiting the Testing System
Exploiting the Testing SystemExploiting the Testing System
Exploiting the Testing Systemfrisksoftware
 
MonkeyTalk Documentation
MonkeyTalk DocumentationMonkeyTalk Documentation
MonkeyTalk DocumentationVivek Pansara
 
Visual Regression Testing
Visual Regression TestingVisual Regression Testing
Visual Regression TestingVodqaBLR
 
System Testing of Timing Requirements based on Use Cases and Timed Automata
System Testing of Timing Requirements based on Use Cases and Timed AutomataSystem Testing of Timing Requirements based on Use Cases and Timed Automata
System Testing of Timing Requirements based on Use Cases and Timed AutomataLionel Briand
 
Ielts -International English Language Testing System
Ielts -International English Language Testing SystemIelts -International English Language Testing System
Ielts -International English Language Testing SystemIlamed Courses
 
Regression testing
Regression testingRegression testing
Regression testingMohua Amin
 
Sergii Puzankov «UI Regression Testing with "Gemini"»
Sergii Puzankov «UI Regression Testing with "Gemini"»Sergii Puzankov «UI Regression Testing with "Gemini"»
Sergii Puzankov «UI Regression Testing with "Gemini"»LogeekNightUkraine
 
Software testing definition
Software testing definitionSoftware testing definition
Software testing definitionHiro Mia
 
Scalable Software Testing and Verification of Non-Functional Properties throu...
Scalable Software Testing and Verification of Non-Functional Properties throu...Scalable Software Testing and Verification of Non-Functional Properties throu...
Scalable Software Testing and Verification of Non-Functional Properties throu...Lionel Briand
 

Viewers also liked (13)

How to configure monkey talk android agent
How to configure monkey talk android agentHow to configure monkey talk android agent
How to configure monkey talk android agent
 
Exploiting the Testing System
Exploiting the Testing SystemExploiting the Testing System
Exploiting the Testing System
 
MonkeyTalk Documentation
MonkeyTalk DocumentationMonkeyTalk Documentation
MonkeyTalk Documentation
 
Visual Regression Testing
Visual Regression TestingVisual Regression Testing
Visual Regression Testing
 
System Testing of Timing Requirements based on Use Cases and Timed Automata
System Testing of Timing Requirements based on Use Cases and Timed AutomataSystem Testing of Timing Requirements based on Use Cases and Timed Automata
System Testing of Timing Requirements based on Use Cases and Timed Automata
 
Ielts -International English Language Testing System
Ielts -International English Language Testing SystemIelts -International English Language Testing System
Ielts -International English Language Testing System
 
Regression testing
Regression testingRegression testing
Regression testing
 
Sergii Puzankov «UI Regression Testing with "Gemini"»
Sergii Puzankov «UI Regression Testing with "Gemini"»Sergii Puzankov «UI Regression Testing with "Gemini"»
Sergii Puzankov «UI Regression Testing with "Gemini"»
 
presentation on Virus
presentation on Viruspresentation on Virus
presentation on Virus
 
System testing
System testingSystem testing
System testing
 
Software testing definition
Software testing definitionSoftware testing definition
Software testing definition
 
Scalable Software Testing and Verification of Non-Functional Properties throu...
Scalable Software Testing and Verification of Non-Functional Properties throu...Scalable Software Testing and Verification of Non-Functional Properties throu...
Scalable Software Testing and Verification of Non-Functional Properties throu...
 
Software testing ppt
Software testing pptSoftware testing ppt
Software testing ppt
 

Recently uploaded

My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationRidwan Fadjar
 
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
 
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Patryk Bandurski
 
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
 
Training state-of-the-art general text embedding
Training state-of-the-art general text embeddingTraining state-of-the-art general text embedding
Training state-of-the-art general text embeddingZilliz
 
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)Wonjun Hwang
 
Streamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupStreamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupFlorian Wilhelm
 
Connect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationConnect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationSlibray Presentation
 
What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024Stephanie Beckett
 
My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024The Digital Insurer
 
Artificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxArtificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxhariprasad279825
 
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationBeyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationSafe Software
 
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks..."LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...Fwdays
 
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024BookNet Canada
 
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
 
Story boards and shot lists for my a level piece
Story boards and shot lists for my a level pieceStory boards and shot lists for my a level piece
Story boards and shot lists for my a level piececharlottematthew16
 
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek SchlawackFwdays
 
Install Stable Diffusion in windows machine
Install Stable Diffusion in windows machineInstall Stable Diffusion in windows machine
Install Stable Diffusion in windows machinePadma Pradeep
 
"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
 
Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsScanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsRizwan Syed
 

Recently uploaded (20)

My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 Presentation
 
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
 
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
 
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
 
Training state-of-the-art general text embedding
Training state-of-the-art general text embeddingTraining state-of-the-art general text embedding
Training state-of-the-art general text embedding
 
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
 
Streamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupStreamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project Setup
 
Connect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationConnect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck Presentation
 
What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024
 
My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024
 
Artificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxArtificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptx
 
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationBeyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
 
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks..."LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
 
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
 
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
 
Story boards and shot lists for my a level piece
Story boards and shot lists for my a level pieceStory boards and shot lists for my a level piece
Story boards and shot lists for my a level piece
 
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
 
Install Stable Diffusion in windows machine
Install Stable Diffusion in windows machineInstall Stable Diffusion in windows machine
Install Stable Diffusion in windows machine
 
"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
 
Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsScanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL Certs
 

System Testing with Robotium