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
·
Ship Features Fearlessly
Turn features on and off without deploys. Used by thousands of Ruby developers.
→
Soham Mondal
September 15, 2016
Technology
110
2
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
Testing in Android
A presentation on Testing in Android presented at the Mobile developer summit 2016.
Soham Mondal
September 15, 2016
More Decks by Soham Mondal
See All by Soham Mondal
Building Unstoppable Products v1.1
soham
0
150
Product Design as Your Competitive Edge
soham
0
160
Building Unstoppable Startups: Product Design as Your Competitive Edge
soham
0
190
Best Practices For Designing Apps For India - Devfest Bangalore 2022
soham
0
610
How (and Why) to be a data driven startup - THub Rubrix
soham
0
260
GFS - Startup School 2022
soham
0
720
Designing Experiences For Indian Users - T-Hub
soham
0
400
Designing_Products_For_Novice_Internet_Users_-_I.pdf
soham
0
180
Designing Products for Novice Internet Users - Opportunities & Problems
soham
1
290
Other Decks in Technology
See All in Technology
作り直せるコードは迅速に 作り直せないDBは慎重に - AI時代のプロダクトエンジニアが「判断の不可逆性」で開発速度を変える話
kinosuke01
0
280
AIで開発は速くなったのに、なぜ現場は楽にならないのか 〜あなたの組織のボトルネックを突き止めるワークショップ〜
jacopen
1
290
目の前の楽しいが人生を変える - コミュニティの螺旋の歩き方と楽しむコツ / change your life
soudai
PRO
3
160
#jawssonic2026 あの時代が悪かった ~動かなかったSageMakerと共に迎えたイベント当日~
ktkn1129
0
140
Azure Cost Management の FOCUS コストデータを迷わず読むための“3つの軸”
tetsuyaooooo
0
160
GoにおけるFFIのこれまでとこれから
goccy
4
1.3k
Snowflakeのコスト最適化を支えるアーキテクチャ設計
ktatsuya
0
910
多摩川(.dev)ランニング入門 / Tamagawa.dev#3
fujiwara3
3
420
AIで実装は速くなった。なのにプロダクトは速くならない。職能の壁を越えて価値のフローを設計する
nwiizo
7
7.5k
Benchmarking Vector Databases: pgvector vs. LanceDB
tsho
0
150
Driving AI Adoption Using In-House GPUs to Serve Qwen
po3rin
2
470
WAF 運用改善の承認サイクル/SRE_BizReach_MIXI_1
visional_engineering_and_design
2
380
Featured
See All Featured
Darren the Foodie - Storyboard
khoart
PRO
3
3.9k
Product Roadmaps are Hard
iamctodd
55
13k
GitHub's CSS Performance
jonrohan
1033
470k
Measuring Dark Social's Impact On Conversion and Attribution
stephenakadiri
2
270
Organizational Design Perspectives: An Ontology of Organizational Design Elements
kimpetersen
PRO
1
820
Large-scale JavaScript Application Architecture
addyosmani
515
110k
Principles of Awesome APIs and How to Build Them.
keavy
128
18k
Rebuilding a faster, lazier Slack
samanthasiow
85
9.6k
Paper Plane (Part 1)
katiecoart
PRO
1
11k
We Are The Robots
honzajavorek
0
350
Why Our Code Smells
bkeepers
PRO
340
58k
How to Think Like a Performance Engineer
csswizardry
28
2.8k
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