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
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
250
GFS - Startup School 2022
soham
0
710
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
Oracle MCP Servers Explained
thatjeffsmith
0
200
AI・HPC開発を支えるGPU環境の新しい選択肢 液冷GPUシステム「AquSys」の取り組み
gpuunite_official
0
130
20260807_第6回_関東kaggler会LT_claw系bot xangiと始める、"寂しくない" kaggle
sugupoko
0
370
猫付きpingコマンドを自作
uyuki234
0
270
Kiro入門|仕様駆動開発で変わるAI時代の開発スタイル
cmkudo
0
220
AI開発に用いられるHPC技術について
gpuunite_official
0
150
関東Kaggler会発表資料
takoi
1
260
平文パスワードはログに“残り” ── 肝心の侵入は“痕跡すら残らない”
kuroneko13
0
110
自宅NWにISR4331を導入してみた話
okaits
0
110
35分でわかるEffective Platform Engineering
nwiizo
5
520
Head First モブプログラミング / Head First Mobprogramming
takaking22
10
12k
My broken English still works: speaking at global OSS events
naruoga
0
120
Featured
See All Featured
Future Trends and Review - Lecture 12 - Web Technologies (1019888BNR)
signer
PRO
0
3.7k
Helping Users Find Their Own Way: Creating Modern Search Experiences
danielanewman
31
3.3k
Evolution of real-time – Irina Nazarova, EuRuKo, 2024
irinanazarova
9
1.5k
Noah Learner - AI + Me: how we built a GSC Bulk Export data pipeline
techseoconnect
PRO
0
390
Odyssey Design
rkendrick25
PRO
2
770
No one is an island. Learnings from fostering a developers community.
thoeni
21
3.8k
Gemini Prompt Engineering: Practical Techniques for Tangible AI Outcomes
mfonobong
2
490
Groundhog Day: Seeking Process in Gaming for Health
codingconduct
0
290
Skip the Path - Find Your Career Trail
mkilby
1
190
How GitHub (no longer) Works
holman
316
150k
Exploring anti-patterns in Rails
aemeredith
3
470
Writing Fast Ruby
sferik
630
63k
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