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
Kyohei Kato
February 18, 2019
Technology
0
6.8k
Espresso Driver を用いた Appium テストとその仕組み
Kyohei Kato
February 18, 2019
Tweet
Share
More Decks by Kyohei Kato
See All by Kyohei Kato
After Party DroidKaigi 2021
ksfee684
0
580
cookpad-summer-internship-2020-android
ksfee684
0
8.2k
cookpad.apk#5
ksfee684
0
650
cookpad.apk#4
ksfee684
0
710
Testing in weekly release
ksfee684
0
860
UI テストで楽するための技術
ksfee684
0
500
Android における UI テスト設計戦略
ksfee684
2
1.1k
Other Decks in Technology
See All in Technology
フルカイテン株式会社 エンジニア向け採用資料
fullkaiten
0
9.9k
Knowledge Work の AI Backend
kworkdev
PRO
0
290
業務の煩悩を祓うAI活用術108選 / AI 108 Usages
smartbank
9
15k
[Neurogica] 採用ポジション/ Recruitment Position
neurogica
1
130
Next.js 16の新機能 Cache Components について
sutetotanuki
0
190
2025-12-18_AI駆動開発推進プロジェクト運営について / AIDD-Promotion project management
yayoi_dd
0
170
LayerX QA Night#1
koyaman2
0
270
Claude Skillsの テスト業務での活用事例
moritamasami
1
110
NIKKEI Tech Talk #41: セキュア・バイ・デザインからクラウド管理を考える
sekido
PRO
0
230
MySQLとPostgreSQLのコレーション / Collation of MySQL and PostgreSQL
tmtms
1
1.3k
Amazon Bedrock Knowledge Bases × メタデータ活用で実現する検証可能な RAG 設計
tomoaki25
6
2.5k
ハッカソンから社内プロダクトへ AIエージェント ko☆shi 開発で学んだ4つの重要要素
leveragestech
0
280
Featured
See All Featured
I Don’t Have Time: Getting Over the Fear to Launch Your Podcast
jcasabona
34
2.6k
Faster Mobile Websites
deanohume
310
31k
Context Engineering - Making Every Token Count
addyosmani
9
560
Visualizing Your Data: Incorporating Mongo into Loggly Infrastructure
mongodb
48
9.8k
Unlocking the hidden potential of vector embeddings in international SEO
frankvandijk
0
130
brightonSEO & MeasureFest 2025 - Christian Goodrich - Winning strategies for Black Friday CRO & PPC
cargoodrich
2
68
Utilizing Notion as your number one productivity tool
mfonobong
2
190
Building a Scalable Design System with Sketch
lauravandoore
463
34k
Crafting Experiences
bethany
0
23
Future Trends and Review - Lecture 12 - Web Technologies (1019888BNR)
signer
PRO
0
3.1k
The Power of CSS Pseudo Elements
geoffreycrofte
80
6.1k
Claude Code のすすめ
schroneko
67
210k
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