Lock in $30 Savings on PRO—Offer Ends Soon! ⏳
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
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
110
Product Design as Your Competitive Edge
soham
0
120
Building Unstoppable Startups: Product Design as Your Competitive Edge
soham
0
170
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
680
Designing Experiences For Indian Users - T-Hub
soham
0
370
Designing_Products_For_Novice_Internet_Users_-_I.pdf
soham
0
160
Designing Products for Novice Internet Users - Opportunities & Problems
soham
1
260
Other Decks in Technology
See All in Technology
翻訳・対話・越境で強いチームワークを作ろう! / Building Strong Teamwork through Interpretation, Dialogue, and Border-Crossing
ar_tama
4
1.6k
直接メモリアクセス
koba789
0
140
履歴テーブル、今回はこう作りました 〜 Delegated Types編 〜 / How We Built Our History Table This Time — With Delegated Types
moznion
16
9.5k
GitLab Duo Agent Platformで実現する“AI駆動・継続的サービス開発”と最新情報のアップデート
jeffi7
0
170
“決まらない”NSM設計への処方箋 〜ビットキーにおける現実的な指標デザイン事例〜 / A Prescription for "Stuck" NSM Design: Bitkey’s Practical Case Study
bitkey
PRO
1
360
Product Engineer
resilire
0
140
Digitization部 紹介資料
sansan33
PRO
1
6.1k
世界最速級 memcached 互換サーバー作った
yasukata
0
160
なぜフロントエンド技術を追うのか?なぜカンファレンスに参加するのか?
sakito
9
2k
Docker, Infraestructuras seguras y Hardening
josejuansanchez
0
150
たかが特別な時間の終わり / It's Only the End of Special Time
watany
6
1.7k
私のRails開発環境
yahonda
0
180
Featured
See All Featured
A Tale of Four Properties
chriscoyier
162
23k
10 Git Anti Patterns You Should be Aware of
lemiorhan
PRO
659
61k
The World Runs on Bad Software
bkeepers
PRO
72
12k
The Pragmatic Product Professional
lauravandoore
37
7.1k
Site-Speed That Sticks
csswizardry
13
990
Music & Morning Musume
bryan
46
7k
Principles of Awesome APIs and How to Build Them.
keavy
127
17k
GitHub's CSS Performance
jonrohan
1032
470k
Sharpening the Axe: The Primacy of Toolmaking
bcantrill
46
2.6k
How to Create Impact in a Changing Tech Landscape [PerfNow 2023]
tammyeverts
55
3.1k
Fashionably flexible responsive web design (full day workshop)
malarkey
407
66k
Designing Experiences People Love
moore
142
24k
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