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
0
6.9k
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
590
cookpad-summer-internship-2020-android
ksfee684
0
8.2k
cookpad.apk#5
ksfee684
0
670
cookpad.apk#4
ksfee684
0
720
Testing in weekly release
ksfee684
0
870
UI テストで楽するための技術
ksfee684
0
520
Android における UI テスト設計戦略
ksfee684
2
1.1k
Other Decks in Technology
See All in Technology
Datadog Cloud Cost Management で実現するFinOps
taiponrock
PRO
0
140
A Gentle Introduction to Transformers
keio_smilab
PRO
1
670
Secure Boot 2026 - Aggiornamento dei certificati UEFI e piano di adozione in azienda
memiug
0
140
フルカイテン株式会社 エンジニア向け採用資料
fullkaiten
0
10k
Startups on Rails: 2026 at RubyConf Thailand
irinanazarova
0
140
オレ達はAWS管理をやりたいんじゃない!開発の生産性を爆アゲしたいんだ!!
wkm2
3
230
類似画像検索モデルの開発ノウハウ
lycorptech_jp
PRO
4
940
AIエージェント・エコノミーの幕開け 〜 オープンプロトコルが変えるビジネスの未来 〜
shukob
0
100
LLM のプロダクト導入における開発の裏側と技術的挑戦
recruitengineers
PRO
1
110
Introduction to Sansan for Engineers / エンジニア向け会社紹介
sansan33
PRO
6
72k
作りっぱなしで終わらせない! 価値を出し続ける AI エージェントのための「信頼性」設計 / Designing Reliability for AI Agents that Deliver Continuous Value
aoto
PRO
1
150
AI時代にエンジニアはどう成長すれば良いのか?
recruitengineers
PRO
1
140
Featured
See All Featured
What’s in a name? Adding method to the madness
productmarketing
PRO
24
4k
JavaScript: Past, Present, and Future - NDC Porto 2020
reverentgeek
52
5.9k
How To Speak Unicorn (iThemes Webinar)
marktimemedia
1
400
Neural Spatial Audio Processing for Sound Field Analysis and Control
skoyamalab
0
200
No one is an island. Learnings from fostering a developers community.
thoeni
21
3.6k
[RailsConf 2023 Opening Keynote] The Magic of Rails
eileencodes
31
10k
The Art of Programming - Codeland 2020
erikaheidi
57
14k
How to Align SEO within the Product Triangle To Get Buy-In & Support - #RIMC
aleyda
1
1.4k
From Legacy to Launchpad: Building Startup-Ready Communities
dugsong
0
170
Effective software design: The role of men in debugging patriarchy in IT @ Voxxed Days AMS
baasie
0
240
Six Lessons from altMBA
skipperchong
29
4.2k
Building the Perfect Custom Keyboard
takai
2
710
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