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
Sponsored
·
SiteGround - Reliable hosting with speed, security, and support you can count on.
→
Soham Mondal
September 15, 2016
Technology
2
100
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
120
Product Design as Your Competitive Edge
soham
0
140
Building Unstoppable Startups: Product Design as Your Competitive Edge
soham
0
180
Best Practices For Designing Apps For India - Devfest Bangalore 2022
soham
0
570
How (and Why) to be a data driven startup - THub Rubrix
soham
0
210
GFS - Startup School 2022
soham
0
680
Designing Experiences For Indian Users - T-Hub
soham
0
380
Designing_Products_For_Novice_Internet_Users_-_I.pdf
soham
0
170
Designing Products for Novice Internet Users - Opportunities & Problems
soham
1
270
Other Decks in Technology
See All in Technology
ブロックテーマでサイトをリニューアルした話 / 2026-01-31 Kansai WordPress Meetup
torounit
0
370
日本語テキストと音楽の対照学習の技術とその応用
lycorptech_jp
PRO
1
410
サイボウズ 開発本部採用ピッチ / Cybozu Engineer Recruit
cybozuinsideout
PRO
10
73k
開発メンバーが語るFindy Conferenceの裏側とこれから
sontixyou
2
530
コスト削減から「セキュリティと利便性」を担うプラットフォームへ
sansantech
PRO
3
1k
予期せぬコストの急増を障害のように扱う――「コスト版ポストモーテム」の導入とその後の改善
muziyoshiz
1
900
GSIが複数キー対応したことで、俺達はいったい何が嬉しいのか?
smt7174
3
130
Oracle Cloud Observability and Management Platform - OCI 運用監視サービス概要 -
oracle4engineer
PRO
2
14k
Application Performance Optimisation in Practice (60 mins)
stevejgordon
0
120
M&A 後の統合をどう進めるか ─ ナレッジワーク × Poetics が実践した組織とシステムの融合
kworkdev
PRO
1
300
KubeCon + CloudNativeCon NA ‘25 Recap, Extensibility: Gateway API / NRI
ladicle
0
170
小さく始めるBCP ― 多プロダクト環境で始める最初の一歩
kekke_n
1
290
Featured
See All Featured
We Are The Robots
honzajavorek
0
160
Paper Plane
katiecoart
PRO
0
46k
AI: The stuff that nobody shows you
jnunemaker
PRO
2
230
Why You Should Never Use an ORM
jnunemaker
PRO
61
9.7k
Pawsitive SEO: Lessons from My Dog (and Many Mistakes) on Thriving as a Consultant in the Age of AI
davidcarrasco
0
62
Faster Mobile Websites
deanohume
310
31k
A Modern Web Designer's Workflow
chriscoyier
698
190k
Exploring anti-patterns in Rails
aemeredith
2
240
Taking LLMs out of the black box: A practical guide to human-in-the-loop distillation
inesmontani
PRO
3
2k
10 Git Anti Patterns You Should be Aware of
lemiorhan
PRO
659
61k
Leading Effective Engineering Teams in the AI Era
addyosmani
9
1.5k
Facilitating Awesome Meetings
lara
57
6.7k
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