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
hikalab
Search
Yuya Kaido
April 23, 2016
Programming
0
180
hikalab
Yuya Kaido
April 23, 2016
Tweet
Share
More Decks by Yuya Kaido
See All by Yuya Kaido
droidkaigi-2019
yuyakaido
7
4.5k
matching-dev-meetup-1
yuyakaido
1
190
minami-aoyama-night-6
yuyakaido
1
1.1k
eureka-meetup-10
yuyakaido
0
750
droidkaigi-2018
yuyakaido
4
5.7k
navitime-eureka-1
yuyakaido
0
66
droidkaigi-2017
yuyakaido
12
7.6k
retty-tech-cafe-8
yuyakaido
0
160
mti-eureka-tech-beer
yuyakaido
0
440
Other Decks in Programming
See All in Programming
Jakarta EE meets AI
ivargrimstad
0
610
シールドクラスをはじめよう / Getting Started with Sealed Classes
mackey0225
4
640
シェーダーで魅せるMapLibreの動的ラスタータイル
satoshi7190
1
480
3rd party scriptでもReactを使いたい! Preact + Reactのハイブリッド開発
righttouch
PRO
1
600
Webの技術スタックで マルチプラットフォームアプリ開発を可能にするElixirDesktopの紹介
thehaigo
2
1k
Quine, Polyglot, 良いコード
qnighy
4
640
RubyLSPのマルチバイト文字対応
notfounds
0
120
エンジニアとして関わる要件と仕様(公開用)
murabayashi
0
290
A Journey of Contribution and Collaboration in Open Source
ivargrimstad
0
910
色々なIaCツールを実際に触って比較してみる
iriikeita
0
330
みんなでプロポーザルを書いてみた
yuriko1211
0
260
Better Code Design in PHP
afilina
PRO
0
120
Featured
See All Featured
Why Our Code Smells
bkeepers
PRO
334
57k
Raft: Consensus for Rubyists
vanstee
136
6.6k
ReactJS: Keep Simple. Everything can be a component!
pedronauck
665
120k
How to train your dragon (web standard)
notwaldorf
88
5.7k
Making Projects Easy
brettharned
115
5.9k
It's Worth the Effort
3n
183
27k
Build your cross-platform service in a week with App Engine
jlugia
229
18k
Automating Front-end Workflow
addyosmani
1366
200k
The Illustrated Children's Guide to Kubernetes
chrisshort
48
48k
Product Roadmaps are Hard
iamctodd
PRO
49
11k
How to Create Impact in a Changing Tech Landscape [PerfNow 2023]
tammyeverts
47
2.1k
CoffeeScript is Beautiful & I Never Want to Write Plain JavaScript Again
sstephenson
159
15k
Transcript
Couples Android Team ώΧˑϥϘ yuyakaido
ࣗݾհ • ւ౻༏ʢ͔͍Ͳ͏Ώ͏ʣ • גࣜձࣾΤϨΧ • 1ͷΠϯλʔϯΛܦͯɺ20154݄ʹ৽ଔೖࣾ • AndroidͷνʔϜϦʔμʔ
yuyakaido yuyakaido
גࣜձࣾΤϨΧ • ࣗࣾαʔϏεͷاըɾ։ൃɾӡӦ • ΦϯϥΠϯσʔςΟϯάαʔϏεɿ • Χοϓϧઐ༻ΞϓϦɿ • ࣾһɿ104໊ •
IAC ΤϯδχΞ 51 ඇΤϯδχΞ 53
࣍ • େنνʔϜͰͷޮతͳ։ൃ • AndroidͳΒͰͷۤ࿑ • ·ͱΊ
࣍ • େنνʔϜͰͷޮతͳ։ൃ • AndroidͳΒͰͷۤ࿑ • ·ͱΊ
Couplesͷن • ػೳ • νʔϜϝϯόʔ • ϦϙδτϦ
Couplesͷػೳ
Couplesͷػೳ
νʔϜϝϯόʔ • ϦϦʔε·Ͱ3ਓͰ։ൃ • ࣄۀͷ֦େʹͬͯ૿һ • ࠷ऴతʹ8ਓ • ࣾһɿ3ਓ •
ۀҕୗɿ4໊ • Πϯλʔϯɿ1໊
ϦϙδτϦͷن 10902 commits 2556 files 304499 lines
େنνʔϜͰޮతʹ։ൃ͢ΔͨΊʹ • νʔϜͷׂ • ϥΠϒϥϦͷར༻ • ίʔυϨϏϡʔ • ςετ •
ܧଓతΠϯςάϨʔγϣϯͷಋೖ
νʔϜͷׂ • 8໊ɿࣾһ3໊ɺۀҕୗ4໊ɺΠϯλʔϯ1໊ ࣾһ ࣾһ ۀҕୗ ۀҕୗ ࣾһ ۀҕୗ
Πϯλʔϯ ۀҕୗ ৽ػೳ։ൃ ࠂػೳ։ൃ
ϥΠϒϥϦͷར༻ • ௨৴ • Volley -> OkHttp, Retrofit • Glide
• DB • ActiveAndroid -> Android-Orma • ͦͷଞ • RxJava, Dagger
ϥΠϒϥϦΛ͏ϝϦοτ • ։ൃΛݮग़དྷΔ͜ͱ • ϝϯςφϯεͷݮ • ௨৴पΓͷ੬ऑੑࢭ
ίʔυϨϏϡʔ • తɿΫΦϦςΟͷ୲อ • GitHubͷϓϧϦΫΤετΛར༻ develop feature ϓϧϦΫΤετˍίʔυϨϏϡʔ
ίʔυϨϏϡʔͷϙΠϯτ • มߋͷతɺ֬ೝ߲Λ໌֬ʹ͓ͯ͘͠ • ग़དྷΔ͚ͩখ͘͞ϓϧϦΫΤετΛग़͢ • ίʔσΟϯάنΛܾΊ͓ͯ͘ • దʹٕज़తͳԥΓ߹͍Λ͢Δ
ςετ • େنΞϓϦΛશͯਓྗͰςετ͢Δͷඇݱ࣮త • ςετϑϨʔϜϫʔΫΛͬͯޮతʹςετ • Ϣχοτςετ → JUnit/Robolectric •
UIςετ → Espresso
JUnit/Robolectric • JUnitɿJavaͷςετϑϨʔϜϫʔΫ • Ϣχοτςετ • RobolectricɿAndroidͷςετϑϨʔϜϫʔΫ • AndroidϑϨʔϜϫʔΫͷϞοΫ •
ຊདྷ࣮ػͰͳ͍ͱςετ͍͠ͷͰɺ࣮ػ ͳ͠Ͱςετ͕ՄೳʹͳΔ
Espresso • UIͷಈ͖ΛؚΊͨςετ͕ॻ͚Δ
શମઃܭ Repository UseCase Presenter View Dao Client Database Server
Presentation Domain Infrastructure
Presentation • Ͳ͏දࣔ͢Δ͔Λهड़ • MVPϞυΩ • PresenterPure Java (ContextҎ֎) •
PresenterJUnit/RobolectricͰςετ • ViewEspressoͰςετ(Robolectricซ༻)
Domain • ԿΛ࣮ݱ͢Δ͔Λهड़ • Pure Java (ContextҎ֎) • JUnit/RobolectricͰςετ
Infrastructure • Ͳ͏࣮ͬͯݱ͢Δ͔Λهड़ • DB • API • Pure Java
(ContextҎ֎) • JUnit/RobolectricͰςετ
ςετʹڵຯͷ͋Δํ • ͕ςετॻ͚ॻ͚͓͡͞ΜʹͳͬͨܦҢͱͦ ͷաఔͰͬͨ͜ͱ • https://speakerdeck.com/yuyakaido/ droidkaigi-2016 • ςελϒϧͳઃܭΛໝͯ͠Έͨ •
https://speakerdeck.com/yuyakaido/ android-testing-bootcamp-1
ܧଓతΠϯςάϨʔγϣϯͷಋೖ push hook distribute notify mention build & test
ςετͷϙΠϯτ • EspressoΛ͏͜ͱͰUIͷಈؚ͖Ίͨςετ͕هड़ग़དྷ Δ͕ɺUIςετඇৗʹ͕͔͔࣌ؒΓɺCI͕ճͤͳ͘ͳΔ • ग़དྷΔ͚ͩJUnitͰߴʹςετ • JUnitͰςετ͕͍͠Օॴ݁߹ςετΛߦ͏߹ EspressoΛ͏ •
ఘΊ؊৺
࣍ • େنνʔϜͰͷޮతͳ։ൃ • AndroidͳΒͰͷۤ࿑ • ·ͱΊ
AndroidͳΒͰͷۤ࿑ • ػछґଘ • iOSϑΝʔετͰͷ։ൃʹΑΔฐ
ػछґଘ • ༷ʑͳϝʔΧʔͷΧελϚΠζ • ΧελϚΠζ͕ݪҼͷόά͕ͪ´ • ։ൃஈ֊Ͱશͯݕ͢Δͷ͍͠
ػछґଘΛݕ͢ΔͨΊʹ • ࣾݕূΛͬͨςετ • 20ͷݕূ༻ • ֎෦ςετϕϯμʔͰͷςετ • ςετέʔεʹج͍ͮͨςετ
iOSϑΝʔετͰͷ։ൃ • iOSͷϦϦʔεޙʹAndroidʹணख • AndroidৗʹiOSΛ͍͔͚ΔܗͰ։ൃ • iOSͰͷ༷มߋ͕Androidʹڞ༗͞Εͳ͍
GoogleεϥΠυ
GoogleεϥΠυΛ͏͜ͱͰ GoogleεϥΠυ σβΠφʔ ΤϯδχΞ ߋ৽ ଈ࣌ө
࣍ • େنνʔϜͰͷޮతͳ։ൃ • AndroidͳΒͰͷۤ࿑ • ·ͱΊ
·ͱΊ • େنνʔϜͰͷޮతͳ։ൃ • νʔϜΛׂͯ͠ෳػೳͷಉ࣌։ൃ • ϥΠϒϥϦΛར༻ͨ͠ޮతͳ։ൃ • ίʔυϨϏϡʔͱςετʹΑΔ࣭ͷ୲อ •
AndroidͳΒͰͷۤ࿑ • ػछґଘɿ༷ʑͳͰͷςετ • iOSϑΝʔετʹΑΔฐɿ༷มߋ͕શମʹڞ༗͞ΕΔΈ
Thank you :) Credit: NASA Earth Observatory/NOAA NGDC