Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
Testing in Android
Search
Soham Mondal
September 15, 2016
Technology
2
99
Testing in Android
A presentation on Testing in Android presented at the Mobile developer summit 2016.
Soham Mondal
September 15, 2016
Tweet
Share
More Decks by Soham Mondal
See All by Soham Mondal
Building Unstoppable Products v1.1
soham
0
110
Product Design as Your Competitive Edge
soham
0
120
Building Unstoppable Startups: Product Design as Your Competitive Edge
soham
0
160
Best Practices For Designing Apps For India - Devfest Bangalore 2022
soham
0
560
How (and Why) to be a data driven startup - THub Rubrix
soham
0
190
GFS - Startup School 2022
soham
0
660
Designing Experiences For Indian Users - T-Hub
soham
0
370
Designing_Products_For_Novice_Internet_Users_-_I.pdf
soham
0
150
Designing Products for Novice Internet Users - Opportunities & Problems
soham
1
250
Other Decks in Technology
See All in Technology
アノテーション作業書作成のGood Practice
cierpa0905
PRO
1
350
AIとの協業で実現!レガシーコードをKotlinらしく生まれ変わらせる実践ガイド
zozotech
PRO
2
240
新米エンジニアをTech Leadに任命する ー 成長を支える挑戦的な人と組織のマネジメント
naopr
1
340
AI連携の新常識! 話題のMCPをはじめて学ぶ!
makoakiba
0
170
AIがコードを書いてくれるなら、新米エンジニアは何をする? / komekaigi2025
nkzn
24
16k
Amazon Q Developer CLIをClaude Codeから使うためのベストプラクティスを考えてみた
dar_kuma_san
0
300
オブザーバビリティが育むシステム理解と好奇心
maruloop
3
1.9k
[re:Inent2025事前勉強会(有志で開催)] re:Inventで見つけた人生をちょっと変えるコツ
sh_fk2
1
1.1k
データとAIで明らかになる、私たちの課題 ~Snowflake MCP,Salesforce MCPに触れて~ / Data and AI Insights
kaonavi
0
220
戦えるAIエージェントの作り方
iwiwi
19
9k
.NET 10のBlazorの期待の新機能
htkym
0
170
Observability — Extending Into Incident Response
nari_ex
2
700
Featured
See All Featured
ReactJS: Keep Simple. Everything can be a component!
pedronauck
666
130k
The MySQL Ecosystem @ GitHub 2015
samlambert
251
13k
Six Lessons from altMBA
skipperchong
29
4k
10 Git Anti Patterns You Should be Aware of
lemiorhan
PRO
658
61k
Art, The Web, and Tiny UX
lynnandtonic
303
21k
Design and Strategy: How to Deal with People Who Don’t "Get" Design
morganepeng
132
19k
Practical Tips for Bootstrapping Information Extraction Pipelines
honnibal
PRO
23
1.5k
RailsConf & Balkan Ruby 2019: The Past, Present, and Future of Rails at GitHub
eileencodes
140
34k
CoffeeScript is Beautiful & I Never Want to Write Plain JavaScript Again
sstephenson
162
15k
Java REST API Framework Comparison - PWX 2021
mraible
34
8.9k
Typedesign – Prime Four
hannesfritz
42
2.8k
Why Our Code Smells
bkeepers
PRO
340
57k
Transcript
Testing in Android Soham Mondal Founder, Triveous
About me - Founder, Triveous - Creator, Voice Recorder -
Google Expert: UX - Android/UX consultant - Organizer at Blrdroid - Mentor at the Google Launchpad Accelerator
Agenda • Android architecture: MVP/MVVM/MVC? • What is Testing? Testing
principles • Types of Tests • Unit testing • Demo: Unit Testing • Instrumentation Testing • Demo: Instrumentation testing • Continuous Integration
Android Architecture • MVC: Model View Controller • MVP: Model
View Presenter • MVVM: Model View ViewModel • Clean Architecture by UncleBob
Clean Architecture • Framework • Slaves of the Framework •
Separate business logic from Framework • Activities/Fragments • Entanglement • Impacts Portability/Maintainability/Clarity of the solution
MVP • Presenter • Injecting presenter into Views • Can
unit test the presenter http://hannesdorfmann.com/mosby/mvp/
TESTING Testing helps create great, stable, maintainable and scalable apps
Testing Principles • Clean architecture • Understand what you’re trying
to test • Isolation • Integration • All possible scenarios • TDD
Type of Tests • Unit tests • Integration tests •
End to end tests (Instrumentation tests) http://googletesting.blogspot.in/2015/04/just-say-no-to-more-end-to-end-tests.html
Objective of Unit Testing? • Just the core functionality/business logic
• No external dependencies • Quick and predictable • All possible scenarios • TDD
Unit Testing • Options: Roboelectric, JUnit • Unit testing on
android studio • Mockito • PowerMock
Mockito -@mock -when/thenReturn -@spy -verify -@ArgumentCaptor
UNIT TEST DEMO
Objective: What are you testing? • End to end functionality
• UI • External dependencies • Longer • Flaky
Instrumentation tests • Options: Robotium, Espresso • Why is espresso
generally better? • Espresso test recorder in android studio • Support for firebase test lab
None
None
ESPRESSO DEMO
More Espresso • Espresso-Intents and Intent Stubbing • Espresso-Contrib for
DatePicker, RecyclerView, Drawer actions, Accessibility checks, CountingIdlingResource • Idling resources • Code coverage
CONTINUOUS INTEGRATION
CI • Jenkins • Travis/Circle CI/others • Integration with github
and others • Automated reporting: Email/Update slack • Deploy to play store
None