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
A Guide to Unit Testing Architecture Components
Search
Sponsored
·
Ship Features Fearlessly
Turn features on and off without deploys. Used by thousands of Ruby developers.
→
Android Maestro
August 09, 2019
Programming
0
49
A Guide to Unit Testing Architecture Components
Android Maestro
August 09, 2019
Tweet
Share
More Decks by Android Maestro
See All by Android Maestro
Easy Backends for Android Developers with Ktor
jabeznzomo99
1
54
Kotlin Coroutines (Hands-On)
jabeznzomo99
0
32
Introduction to Kotlin (Hands On)
jabeznzomo99
0
120
Android MVVM Architecture
jabeznzomo99
0
45
Kotlin Coroutines: Google IO Extended 2019 Nairobi
jabeznzomo99
0
27
Other Decks in Programming
See All in Programming
エンジニアの「手元の自動化」を加速するn8n 2026.02.27
symy2co
0
180
PHP でエミュレータを自作して Ubuntu を動かそう
m3m0r7
PRO
2
150
モダンOBSプラグイン開発
umireon
0
180
AI時代の脳疲弊と向き合う ~言語学としてのPHP~
sakuraikotone
1
1.6k
LM Linkで(非力な!)ノートPCでローカルLLM
seosoft
0
240
PHPのバージョンアップ時にも役立ったAST(2026年版)
matsuo_atsushi
0
260
Claude Codeログ基盤の構築
giginet
PRO
7
3.7k
GC言語のWasm化とComponent Modelサポートの実践と課題 - Scalaの場合
tanishiking
0
130
ロボットのための工場に灯りは要らない
watany
12
3.2k
実践ハーネスエンジニアリング #MOSHTech
kajitack
7
4.3k
Everything Claude Code OSS詳細 — 5層構造の中身と導入方法
targe
0
150
最初からAWS CDKで技術検証してもいいんじゃない?
akihisaikeda
4
170
Featured
See All Featured
How to Grow Your eCommerce with AI & Automation
katarinadahlin
PRO
1
160
The Cult of Friendly URLs
andyhume
79
6.8k
Become a Pro
speakerdeck
PRO
31
5.9k
WCS-LA-2024
lcolladotor
0
500
Efficient Content Optimization with Google Search Console & Apps Script
katarinadahlin
PRO
1
440
Practical Tips for Bootstrapping Information Extraction Pipelines
honnibal
25
1.8k
実際に使うSQLの書き方 徹底解説 / pgcon21j-tutorial
soudai
PRO
199
73k
Into the Great Unknown - MozCon
thekraken
40
2.3k
No one is an island. Learnings from fostering a developers community.
thoeni
21
3.6k
Reflections from 52 weeks, 52 projects
jeffersonlam
356
21k
More Than Pixels: Becoming A User Experience Designer
marktimemedia
3
360
The untapped power of vector embeddings
frankvandijk
2
1.6k
Transcript
A Guide to Unit Testing Architecture Components
HELLO! I am Jabez Magomere (Mc JB) Android Developer and
Student (CS) 2 https://github.com/JabezNzomo99 @mc_jayb
3 Why Test? Testing is a good software practice that
helps level-up a team’s and an individual’s productivity and efficiency.
4 Why Test? Prevent unforeseen bugs in an application by
testing for all extreme use cases.
5 Get notified of any changes that breaks code (CI/CD)
Why Test?
6 Why Test? To write beautiful and clean code.
7 TESTING MYTHS
8 TESTING SLOWS DOWN DEVELOPMENT
9 TESTING IS HARD
10 TEST CODE IS NOT PRODUCTION CODE
11 Factors to consider when writing tests • Scope •
Fidelity • Speed
12
13 Architecture Components • LiveData • Room • View Model
• Data binding • Life Cycle • Navigation
14
15 Unit Testing Room
16 Unit Testing Room Testing points Test the behaviour your
database query functions in the DAOs. Insert, Delete, Get. etc
17 Unit Testing Room Testing Tools Room.inMemoryDatabase Builder() AndroidX Test
Robolectric 4.0 Hamcrest/Assert J
18 Unit Testing LiveData
19 Unit Testing LiveData Testing Tools Room.inMemoryDatabaseBuilder() AndroidX Test Robolectric
4.0 MockK/Mockito Hamcrest/Assert J Junit4/Junit5
20 Unit Testing View Model
21 Additional Resources 1. https://developer.android.com/training/testing/set-up-proje ct 2. https://medium.com/@boonkeat/android-unit-testing-with-j unit5-d1b8f9c620b6?source=email-444c006a35b8-1565059 737888-digest.reader------0-58------------------8bc853b8_1882_45
2b_ac63_879f881bb444-1§ionName=top
THANKS! Any questions? 22