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
89
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
36
Product Design as Your Competitive Edge
soham
0
44
Building Unstoppable Startups: Product Design as Your Competitive Edge
soham
0
88
Best Practices For Designing Apps For India - Devfest Bangalore 2022
soham
0
450
How (and Why) to be a data driven startup - THub Rubrix
soham
0
95
GFS - Startup School 2022
soham
0
560
Designing Experiences For Indian Users - T-Hub
soham
0
290
Designing_Products_For_Novice_Internet_Users_-_I.pdf
soham
0
88
Designing Products for Novice Internet Users - Opportunities & Problems
soham
1
180
Other Decks in Technology
See All in Technology
MLOpsの「壁」を乗り越える、LINEヤフーの Data Quality as Code
lycorptech_jp
PRO
5
520
[新卒向け研修資料] テスト文字列に「うんこ」と入れるな(2024年版)
infiniteloop_inc
4
15k
オーナーシップを持つ領域を明確にする
konifar
13
3.2k
KubeCon EU 2024 Recap “Kubernetes Policy Time Machine: Where to Next?”
ryysud
0
220
Tellus の衛星データを見てみよう #mf_fukuoka
kongmingstrap
0
190
プロンプトエンジニアリングでがんばらない-Agentic Workflow へ-近藤憲児
kenjikondobai
2
540
Gitlab本から学んだこと - そーだいなるプレイバック / gitlab-book
soudai
4
410
Google Cloud の AI を支える裏側のインフラを垣間見る!
maroon1st
0
350
EMとして2023年度に頑張ったこと / What we did well in FY2023 as a EM
pauli
1
170
GraphQL 成熟度モデルの紹介と、プロダクトに当てはめた事例 / GraphQL maturity model
mh4gf
7
1.3k
複雑な構成要素を持つUIとの向き合い方 〜新・支出グラフでの実例〜 / B43 TECH TALK
nakamuuu
0
140
Cloud Native Java with Spring Boot (CNCF Aarhus, April 2024)
thomasvitale
1
170
Featured
See All Featured
The Art of Programming - Codeland 2020
erikaheidi
42
12k
Atom: Resistance is Futile
akmur
259
25k
Building a Scalable Design System with Sketch
lauravandoore
456
32k
Building Applications with DynamoDB
mza
88
5.6k
実際に使うSQLの書き方 徹底解説 / pgcon21j-tutorial
soudai
121
39k
Building Adaptive Systems
keathley
31
1.9k
VelocityConf: Rendering Performance Case Studies
addyosmani
320
23k
Testing 201, or: Great Expectations
jmmastey
28
6.4k
Agile that works and the tools we love
rasmusluckow
325
20k
A Philosophy of Restraint
colly
197
16k
Typedesign – Prime Four
hannesfritz
36
2.1k
[RailsConf 2023 Opening Keynote] The Magic of Rails
eileencodes
9
8.3k
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