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
100
2
Share
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
130
Product Design as Your Competitive Edge
soham
0
140
Building Unstoppable Startups: Product Design as Your Competitive Edge
soham
0
180
Best Practices For Designing Apps For India - Devfest Bangalore 2022
soham
0
580
How (and Why) to be a data driven startup - THub Rubrix
soham
0
220
GFS - Startup School 2022
soham
0
690
Designing Experiences For Indian Users - T-Hub
soham
0
390
Designing_Products_For_Novice_Internet_Users_-_I.pdf
soham
0
170
Designing Products for Novice Internet Users - Opportunities & Problems
soham
1
280
Other Decks in Technology
See All in Technology
契約書からの情報抽出を行うLLMのスループットを、バッチ処理を用いて最大40%改善した話
sansantech
PRO
3
330
GitHub Copilot CLI で Azure Portal to Bicep
tsubakimoto_s
0
300
開発チームとQAエンジニアの新しい協業モデル -年末調整開発チームで実践する【QAリード施策】-
qa
0
540
LLMに何を任せ、何を任せないか
cap120
11
6.7k
不確実性と戦いながら見積もりを作成するプロセス/mitsumori-process
hirodragon112
1
160
フルカイテン株式会社 エンジニア向け採用資料
fullkaiten
0
11k
Tour of Agent Protocols: MCP, A2A, AG-UI, A2UI with ADK
meteatamel
0
170
CloudFrontのHost Header転送設定でパケットの中身はどう変わるのか?
nagisa53
1
230
Bref でサービスを運用している話
sgash708
0
220
FlutterでPiP再生を実装した話
s9a17
0
240
昔話で振り返るAWSの歩み ~S3誕生から20年、クラウドはどう進化したのか~
nrinetcom
PRO
0
120
Zephyr(RTOS)でARMとRISC-Vのコア間通信をしてみた
iotengineer22
0
110
Featured
See All Featured
Lightning Talk: Beautiful Slides for Beginners
inesmontani
PRO
1
500
Ecommerce SEO: The Keys for Success Now & Beyond - #SERPConf2024
aleyda
1
1.9k
Collaborative Software Design: How to facilitate domain modelling decisions
baasie
0
180
Bridging the Design Gap: How Collaborative Modelling removes blockers to flow between stakeholders and teams @FastFlow conf
baasie
0
500
DevOps and Value Stream Thinking: Enabling flow, efficiency and business value
helenjbeal
1
160
SERP Conf. Vienna - Web Accessibility: Optimizing for Inclusivity and SEO
sarafernandez
2
1.4k
The Impact of AI in SEO - AI Overviews June 2024 Edition
aleyda
5
780
Fashionably flexible responsive web design (full day workshop)
malarkey
408
66k
Exploring the Power of Turbo Streams & Action Cable | RailsConf2023
kevinliebholz
37
6.3k
SEOcharity - Dark patterns in SEO and UX: How to avoid them and build a more ethical web
sarafernandez
0
160
Documentation Writing (for coders)
carmenintech
77
5.3k
Color Theory Basics | Prateek | Gurzu
gurzu
0
270
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