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
Espresso Driver を用いた Appium テストとその仕組み
Search
Sponsored
·
Ship Features Fearlessly
Turn features on and off without deploys. Used by thousands of Ruby developers.
→
Kyohei Kato
February 18, 2019
Technology
6.9k
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
Espresso Driver を用いた Appium テストとその仕組み
Kyohei Kato
February 18, 2019
More Decks by Kyohei Kato
See All by Kyohei Kato
After Party DroidKaigi 2021
ksfee684
0
600
cookpad-summer-internship-2020-android
ksfee684
0
8.2k
cookpad.apk#5
ksfee684
0
680
cookpad.apk#4
ksfee684
0
720
Testing in weekly release
ksfee684
0
890
UI テストで楽するための技術
ksfee684
0
530
Android における UI テスト設計戦略
ksfee684
2
1.1k
Other Decks in Technology
See All in Technology
protovalidate-es を導入してみた
bengo4com
0
160
2026TECHFRESH畢業分享會 - 原生還是跨平台? App 開發踩坑實錄
line_developers_tw
PRO
0
590
あなたの AI ワークスペースに、 専門コーダーを連れてくる - Amazon Quick Desktop 最新情報
kawaji_scratch
1
130
Kubernetesにおける学習基盤とLLMOpsの概要
ry
1
210
中期計画、2回作ってみた ~業務委託と正社員、両方の視点から~
demaecan
1
610
データ基盤をDataformで整えた話 〜 開発環境を添えて 〜
takapy
0
140
地球に⽣きるAI —GeoAIと「中間領域」— / AI Living on Earth — GeoAI and the “Intermediate Layer” —
ykiyota
0
140
2026TECHFRESH畢業分享會 - Lightning Talk - E起 See See : 電商推薦讀心術? 數據說了算
line_developers_tw
PRO
0
580
ポケモンの型をTypeScriptの型システムで表現してみた
subroh0508
0
360
生成 AI × MCP で切り拓く次世代 SRE!自律型運用への挑戦と開発者体験の進化
_awache
0
190
ブロックチェーン / Blockchain
ks91
PRO
0
120
実装は速くなった、レビューはどうする? ― 自身のレビューをAIで再現させるサーヴァントエンジニアリングのすゝめ / Implementation got faster. So what about reviews? — An invitation to Servant Engineering: Recreating your own code reviews with AI
nrslib
8
4.5k
Featured
See All Featured
A designer walks into a library…
pauljervisheath
211
24k
A Tale of Four Properties
chriscoyier
163
24k
For a Future-Friendly Web
brad_frost
183
10k
Fight the Zombie Pattern Library - RWD Summit 2016
marcelosomers
234
17k
Designing Dashboards & Data Visualisations in Web Apps
destraynor
231
55k
Skip the Path - Find Your Career Trail
mkilby
1
140
Ten Tips & Tricks for a 🌱 transition
stuffmc
0
130
Design of three-dimensional binary manipulators for pick-and-place task avoiding obstacles (IECON2024)
konakalab
0
450
Imperfection Machines: The Place of Print at Facebook
scottboms
270
14k
A Guide to Academic Writing Using Generative AI - A Workshop
ks91
PRO
1
320
[RailsConf 2023] Rails as a piece of cake
palkan
59
6.7k
Mind Mapping
helmedeiros
PRO
1
240
Transcript
Espresso Driver を用いた Appium テストとその仕組み 1 Cookpad.apk #2
自己紹介 •加藤 恭平 (ksfee684) ‣ 技術部品質向上グループ ‣ レシピサービスの Android
アプリで UI テストなどを担当 ‣ おすすめは M:tG
アジェンダ •Appium in Android における仕組み ‣ UIAutomator 概要 ‣ UIAutomator
Driver •Espresso Driver 紹介 ‣ UIAutomator との比較 ‣ 実際どうなのか •おまけ ‣ Project Nitrogen !3 3
Appium
Appium •モバイル端末向け自動テスト ツール ‣HTTP Server (Node) ‣Android, iOS, Windows, macOS
UIAutomator •UI テスティングフレームワーク ‣ Accessibility Service を利用 ‣ アプリを越えて端末操作や情報取得が可能 ‣
e.g. UI Automator Viewer 6
None
UIAutomator × Appium •UIAutomator Driver として存在 •現在 Android のデフォルト Driver
!8 8
ςετରBQL 6*"VUPNBUPS4FSWFSBQL "OESPJE5FTUBQL UIAutomator Driver
UIAutomator Driver 6*"VUPNBUPS4FSWFS XEIVC TFTTJPOTFTTJPO@JE TUBUVT ESJWFSTBWF@TDSFFOTIPU 3VCZ 10 6J"VUPNBUJPOUBLF4DSFFOTIPU
"QQJVN4FSWFS XEIVC TFTTJPOTFTTJPO@JE TUBUVT
UIAutomator × Appium •Pros ‣ 自身のアプリに限らず操作を行う事が可能 • ブラックボックスな自動UIテストを組むことが可能 • テキストを利用した操作から
Resource ID まで •Cons ‣ テスト対象のアプリの操作が難しい • ネットワーク通信待ち合わせのためスリープ !11 11
Espresso Driver
UIAutomator Driver 6*"VUPNBUPS4FSWFS XEIVC TFTTJPOTFTTJPO@JE TUBUVT ESJWFSTBWF@TDSFFOTIPU 3VCZ 13 6J"VUPNBUJPOUBLF4DSFFOTIPU
"QQJVN4FSWFS XEIVC TFTTJPOTFTTJPO@JE TUBUVT
&TQSFTTP4FSWFS ESJWFSTBWF@TDSFFOTIPU 3VCZ XEIVC TFTTJPOTFTTJPO@JE TUBUVT Espresso Driver XEIVC TFTTJPOTFTTJPO@JE
TUBUVT
Espresso Driver •appium-espresso-driver ‣ Espresso を Driver として利用 ‣ 対象アプリの署名を書き換え
Espresso × Appium •Pros ‣ アプリの Context にアクセス可能に ‣ IdlingResource
によってスリープによる待ち合わせが不要 ‣ UIAutomator と同様にブラックボックスに記述できる! •Cons ‣ Espresso ができること以外はできない ‣ Debug ビルドのみ対応 16
実際どうなのか •実際に Driver を置き換えることでどうなるのか ‣ 不必要なスリープの減少 • シナリオ簡潔さ向上 ‣ 既存の
View 探索以外の手法 ‣ Driver の指定を変更するだけで便利 17
Appium Ruby Client •Capability の automationName を切り替えるだけ? •appium_lib では Espresso
Driver への切り替えが シュッとできない •appium_lib_core を直接利用
まとめ •appium-espresso-driver はいいぞ ‣ 互換性もだいたいあるぞ •UIAutomator から抜け出してシナリオ洗練させていくぞ 19
Project Nitrogen
Project Nitrogen •Write once, run everywhere
None
Espresso(Robolectric) Driver •Robolectric (JVM) 上で実行 •Capability によって切替可能に •対象アプリの実装が必要となるので、 既存アプリのテストケースとしてサーバを実装
Espresso(Robolectric) Driver •シュッとできなかった ‣ JUnit の別スレッドで Robolectric が動かない https://github.com/robolectric/robolectric/issues/ 3829