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
94
Product Design as Your Competitive Edge
soham
0
120
Building Unstoppable Startups: Product Design as Your Competitive Edge
soham
0
140
Best Practices For Designing Apps For India - Devfest Bangalore 2022
soham
0
550
How (and Why) to be a data driven startup - THub Rubrix
soham
0
170
GFS - Startup School 2022
soham
0
650
Designing Experiences For Indian Users - T-Hub
soham
0
350
Designing_Products_For_Novice_Internet_Users_-_I.pdf
soham
0
140
Designing Products for Novice Internet Users - Opportunities & Problems
soham
1
240
Other Decks in Technology
See All in Technology
freeeのアクセシビリティの現在地 / freee's Current Position on Accessibility
ymrl
2
260
アクセスピークを制するオートスケール再設計: 障害を乗り越えKEDAで実現したリソース管理の最適化
myamashii
1
250
関数型プログラミングで 「脳がバグる」を乗り越える
manabeai
2
220
AIエージェントが書くのなら直接CloudFormationを書かせればいいじゃないですか何故AWS CDKを使う必要があるのさ
watany
14
5.9k
〜『世界中の家族のこころのインフラ』を目指して”次の10年”へ〜 SREが導いたグローバルサービスの信頼性向上戦略とその舞台裏 / Towards the Next Decade: Enhancing Global Service Reliability
kohbis
2
900
ポストコロナ時代の SaaS におけるコスト削減の意義
izzii
1
190
SEQUENCE object comparison - db tech showcase 2025 LT2
nori_shinoda
0
270
SRE不在の開発チームが障害対応と 向き合った100日間 / 100 days dealing with issues without SREs
shin1988
1
1.1k
ロールが細分化された組織でSREは何をするか?
tgidgd
1
160
CDK Vibe Coding Fes
tomoki10
1
450
DatabricksにOLTPデータベース『Lakebase』がやってきた!
inoutk
0
150
american aa airlines®️ USA Contact Numbers: Complete 2025 Support Guide
aaguide
0
470
Featured
See All Featured
GraphQLの誤解/rethinking-graphql
sonatard
71
11k
How GitHub (no longer) Works
holman
314
140k
Why You Should Never Use an ORM
jnunemaker
PRO
58
9.4k
Git: the NoSQL Database
bkeepers
PRO
430
65k
How to Create Impact in a Changing Tech Landscape [PerfNow 2023]
tammyeverts
53
2.9k
The Language of Interfaces
destraynor
158
25k
Product Roadmaps are Hard
iamctodd
PRO
54
11k
Embracing the Ebb and Flow
colly
86
4.7k
jQuery: Nuts, Bolts and Bling
dougneiner
63
7.8k
I Don’t Have Time: Getting Over the Fear to Launch Your Podcast
jcasabona
32
2.4k
Site-Speed That Sticks
csswizardry
10
690
Fireside Chat
paigeccino
37
3.5k
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