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
How to control state in UI Test
Search
Sponsored
·
Ship Features Fearlessly
Turn features on and off without deploys. Used by thousands of Ruby developers.
→
Shingo Tamaki
February 20, 2019
Technology
2.8k
4
Share
How to control state in UI Test
I considered what how to controll state in UI Test interactively.
This is summary of my idea.
Shingo Tamaki
February 20, 2019
More Decks by Shingo Tamaki
See All by Shingo Tamaki
Use Gemini CLI from Claude Code as part of Sub Agent
tamaki
0
310
Let's make an Immersive Video with APMP
tamaki
0
64
Firebase Studioで始めるモバイルアプリ開発入門
tamaki
0
59
Introduction to Claude Code Action
tamaki
0
810
AIエージェントを使ったiOSアプリ開発を試してみた
tamaki
0
210
沖縄モバイルアプリ開発勉強会#1
tamaki
0
170
iOSアプリ開発を始めよう
tamaki
0
260
詳解xcresult.pdf
tamaki
0
460
メルペイでのリグレッションテスト自動化推進のこれまでとこれから
tamaki
0
840
Other Decks in Technology
See All in Technology
食べログのサーキットブレーカー導入を振り返って
atpons
1
160
AI-DLCを活用した高品質・安全なAI駆動開発実践 / AI Driven Development
yoshidashingo
1
270
AI時代から振り返るTerraform drift運用の歴史 / AI Age Reflections on the History of Terraform Drift Operations
aeonpeople
0
610
OpenID Connectによるサービス間連携
takesection
0
150
類似画像検索モデルの開発ノウハウ
lycorptech_jp
PRO
4
1.1k
Datadog 認定試験の概要と対策
uechishingo
0
210
React、まだ楽しくて草
uhyo
6
860
Diagnosing performance problems without the guesswork
elenatanasoiu
0
130
AIガバナンス実践 - 生成AIコネクタのデータ漏洩リスクと実務対策
knishioka
0
140
OpenClawとHermesAgentでAI新入社員を作った話
takanoriyanada
0
150
エンジニアは生成AIと どのように向き合うべきか? ことばの意味という観点から
verypluming
3
300
最低限これだけ押さえれ大丈夫_Claude Enterprise/Team企業展開ガバナンス入門
tkikuchi
1
560
Featured
See All Featured
Building an army of robots
kneath
306
46k
The #1 spot is gone: here's how to win anyway
tamaranovitovic
2
1.1k
B2B Lead Gen: Tactics, Traps & Triumph
marketingsoph
0
130
How to build a perfect <img>
jonoalderson
1
5.5k
State of Search Keynote: SEO is Dead Long Live SEO
ryanjones
0
200
Measuring Dark Social's Impact On Conversion and Attribution
stephenakadiri
2
200
Skip the Path - Find Your Career Trail
mkilby
1
130
The Straight Up "How To Draw Better" Workshop
denniskardys
239
140k
Evolving SEO for Evolving Search Engines
ryanjones
0
210
Information Architects: The Missing Link in Design Systems
soysaucechin
0
940
Designing Dashboards & Data Visualisations in Web Apps
destraynor
231
55k
RailsConf & Balkan Ruby 2019: The Past, Present, and Future of Rails at GitHub
eileencodes
141
35k
Transcript
XCUITestʹ͓͚Δঢ়ଶ ੍ޚʹ͍ͭͯߟ͑Δ
XCUITestͱ XCTestʹؚ·ΕΔUI Testingͷ௨শ ςετରͷΞϓϦʹର͠ɺϢʔβͱಉͷૢ࡞Λߦ͏UIςε τͷͨΊͷػೳ
ঢ়ଶʹ͍ͭͯ UIςετΑΓϢʔβʹ͍ۙܗͰςετରΞϓϦΛϒϥοΫ ϘοΫεతʹૢ࡞͢ΔͨΊɺ ෦͔ΒมϝιουʹΞΫηε͍͢͠୯ମςετʹൺ Δͱঢ়ଶΛ࡞Γʹ͍͘ͱݴ͑·͢ɻ
ঢ়ଶ੍ޚͷྫ(XCTest) XCUIApplicationͷlaunchArgumentslaunchEnvironmentΛ ͬͯىಈ࣌ʹઃఆΛ༩͑Δ let app = XCUIApplication() app.launchArguments.append("loggedIn") app.launchArguments.append(contentsOf: ["-key",
"abc111222333"]) app.launchArguments.append(contentsOf: ["-skipLogin", "YES"]) app.launchEnvironment["TestMode"] = "UITest"
ঢ়ଶ੍ޚͷྫ(Target Application) ςετରͷΞϓϦͰProcessInfoͷarguments,environment ͔ΒΛऔΓग़ͯ͠༻͠·͢ɻ ProcessInfo.processInfo.arguments.contains("loggedIn") UserDefaults.standard.string(forKey: "key") UserDefaults.standard.bool(forKey: "skipLogin") ProcessInfo.processInfo.environment["TestMode"]
ىಈ࣌ʹҰׅͰ༩͑Δ͔͠ͳ͍
! ىಈޙʹΕͳ͍ͩΖ ͏͔ʁ
ྫ͑͜Μͳ෩ʹ ςετ͔ΒΛૹΓɺඞཁͳΒςετର͔Βड͚औΔ
͔݁Β
ग़དྷ·ͨ͠
Darwin notifications
Darwin notificationsͱʁ CϕʔεͷAPIͰɺΞϓϦؒΛ·͍ͨͰ௨ΛૹΔ͜ͱ͕ՄೳͰ ͢ ! MMWormholeͳͲʹΘΕ͓ͯΓɺWatchExtensionͷ։ ൃΛͨ͠ࣄ͕͋Δਓฉ͍ͨ͜ͱ͕͋Δ͔͠Ε·ͤΜɻ
! ྑͦ͞͏
Darwin notificationsͷΠϝʔδ
Darwin notificationsͷ੍ݶ ௨ͷΈΛૹΓ·͢ɻ NotificationͷΑ͏ʹuserInfoͳͲ͕͋Γ·ͤΜ σʔλΛΓऔΓ͢ΔͷͰ͋ΕԿ͔ผͷΈ͕ඞཁʹͳΓ ·͢ !
͋͞Ͳ͏͠Α͏ʁ
UIPasteboard
UIPasteboard ΞϓϦؒͷใ࿈ܞͱͯ͠ڞ௨Ͱѻ͑ΔϦιʔεͱͯ͠ݕ౼͠ ͨதͰ͍উख͕ྑͦ͞͏ͳͷͱͯ͠UIPasteboardΛͬͯ ΈΔ͜ͱʹ͠·ͨ͠ɻ
Telepathy
Telepathy (Ծ)
Sample Code(XCTest) let exp = XCTestExpectation(description: "normal") Telepathy.ask(with: "normal") {
message in exp.fulfill() } wait(for: [exp], timeout: 5)
Sample Code(Target Application) Telepathy.listen { (message) in if message ==
"foo" { // something } Telepathy.answer() }
࣮ݱग़དྷ·ͨ͠Ͷʁ
ऴΘΓʹ Telepathy·ͩΞΠσΟΞݕূஈ֊Ͱະެ։ͷϥΠϒϥϦͰ ͢ɻ ࣮ફʹ͋ͨΓ༗ޮͳϢʔεέʔεͳͲΛࡧͯ͠Δ࠷தͳͷͰ͝ ҙݟ͍͚ͨͩΔͱ͍Ͱ͢ɻ
Ҏ্