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
What do you want to test with UI Test v2
Search
Shingo Tamaki
January 24, 2020
Programming
2
840
What do you want to test with UI Test v2
I spoke it at Hakata Test Night
Shingo Tamaki
January 24, 2020
Tweet
Share
More Decks by Shingo Tamaki
See All by Shingo Tamaki
沖縄モバイルアプリ開発勉強会#1
tamaki
0
80
iOSアプリ開発を始めよう
tamaki
0
120
詳解xcresult.pdf
tamaki
0
290
メルペイでのリグレッションテスト自動化推進のこれまでとこれから
tamaki
0
670
JPQRによって変わる日本のQRコード決済
tamaki
0
240
What's New in Testing
tamaki
1
58
What do you want to test with UI Test
tamaki
5
1.8k
How to control state in UI Test
tamaki
4
2.5k
Asynchronous Testing in XCTest
tamaki
0
370
Other Decks in Programming
See All in Programming
Streams APIとTCPフロー制御 / Web Streams API and TCP flow control
tasshi
2
330
macOS でできる リアルタイム動画像処理
biacco42
9
2.2k
cXML という電子商取引の トランザクションを支える プロトコルと向きあっている話
phigasui
3
2.3k
Server Driven Compose With Firebase
skydoves
0
430
Quine, Polyglot, 良いコード
qnighy
4
610
Kaigi on Rails 2024 - Rails APIモードのためのシンプルで効果的なCSRF対策 / kaigionrails-2024-csrf
corocn
5
3.7k
AWS IaCの注目アップデート 2024年10月版
konokenj
3
3.2k
GitHub Actionsのキャッシュと手を挙げることの大切さとそれに必要なこと
satoshi256kbyte
5
410
ActiveSupport::Notifications supporting instrumentation of Rails apps with OpenTelemetry
ymtdzzz
1
160
JavaでLチカしたい! / JJUG CCC 2024 Fall LT
nhayato
0
110
A Journey of Contribution and Collaboration in Open Source
ivargrimstad
0
330
Amazon Qを使ってIaCを触ろう!
maruto
0
360
Featured
See All Featured
Responsive Adventures: Dirty Tricks From The Dark Corners of Front-End
smashingmag
250
21k
Learning to Love Humans: Emotional Interface Design
aarron
273
40k
Measuring & Analyzing Core Web Vitals
bluesmoon
2
70
"I'm Feeling Lucky" - Building Great Search Experiences for Today's Users (#IAC19)
danielanewman
226
22k
個人開発の失敗を避けるイケてる考え方 / tips for indie hackers
panda_program
92
16k
Scaling GitHub
holman
458
140k
Designing Dashboards & Data Visualisations in Web Apps
destraynor
229
52k
Code Reviewing Like a Champion
maltzj
520
39k
How to train your dragon (web standard)
notwaldorf
88
5.7k
5 minutes of I Can Smell Your CMS
philhawksworth
202
19k
Faster Mobile Websites
deanohume
305
30k
Creating an realtime collaboration tool: Agile Flush - .NET Oxford
marcduiker
25
1.8k
Transcript
͋ͳ͕ͨUIςετͰධՁ͍ͨ͠ͷ ɹ ԿͰ͔͢ʁ
ࣗݾհ ! ۄ৴ޛ Work as iOS Engineer & Manager for
Origami Organize try!Swift Tokyo 2020 co-auther of iOSςετશॻ
ݴ༿ͷఆٛʹϒϨΛײͨ͡ࣄͳ͍Ͱ͔͢ʁ
ͳΜͪΌΒςετ
ͳΜͪΌΒςετ γεςϜςετ/౷߹ςετ/݁߹ςετ/࿈݁ςετ/֎෦݁߹ς ετ/෦݁߹ςετ/ΠϯςάϨʔγϣϯςετ/֎෦ςετ/ ෦ςετ/ػೳςετ/E2Eςετ/Ϣχοτςετ/୯ମςετ/ε τϨεςετ/ಈతςετ/੩తςετ/ϗϫΠτϘοΫεςετ/ ϒϥοΫϘοΫεςετ/Ϣʔβʔςετ/डೖςετ/UIςετ/ ୳ࡧతςετ/ಉΫϥεςετ/ڥքςετ/σγδϣϯςʔ ϒϧςετ/Έ߹Θͤςετ/ঢ়ଶભҠςετ/σʔλϑϩʔς ετ/ΞυϗοΫςετ/ABςετ/ϦάϨογϣϯςετ/ճؼς
ςετʹؔΘΔ༻ޠ ςετٕ๏/ςετܭը/ςετ߲/ςετΞΠςϜ/ςετγφ ϦΦ/ςετεΟʔτ/ςετϨϕϧ/ςετϓϩηε/ςετ؍/ ςετઃܭ/ςετੳ/ςετఔ/ςετΧόϨοδ/ςετ ϕʔε/ελϒ/ϞοΫ/ςετμϒϧ/SUT/όά/ෆ۩߹/ܽؕ/ނ ো/ϑΥʔϧτ/ςεςΟϯά/νΣοΩϯά/ඇػೳςετ/ςετ λΠϓ/ςετۦಈ։ൃ/TDD/ςετϋʔωε/.....
None
༨ஊ: JSTQBͱ͔ͬͯΈΔͱָ͍͠Α http://jstqb.jp
ؓٳ
ςετϐϥϛου • UI • Service • Unit
UIςετͱͳΜͩΖ ͏ʁ • XCUITestΛ༻ͯ͠ߦ͏ςετશ ͯUIςετʁ • UIʹϑΥʔΧεͨ͠ςετΛߦ͏ς ετʁ
UIςετͱͳΜͩΖ ͏ʁ • UIʹϑΥʔΧεͨ͠ςετΛߦ͏ς ετʁ
UIςετͱͳΜͩΖ ͏ʁ • UIʹϑΥʔΧεͨ͠ςετΛߦ͏ς ετʁ • ධՁ͍ͨ͠ͷ͕ը໘ɾUIίϯϙʔ ωϯτͳͲʹͷΈͰ͋ΕϓϨθ ϯςʔγϣϯʹର͢Δ୯ମɾ݁ ߹ςετ
UIςετͱͳΜͩΖ ͏ʁ • ্ͷʹߦ͘΄Ͳෳࡶɾ݁߹͕ ૿Ճ
UIʹର͢Δςετͱ͍͏ΑΓ UIΛͬͨςετ
UIΛ͏ςετͱ • E2Eςετ • ϒϩʔυελοΫςετ • γεςϜςετ • ૯߹ςετ
͜͜·ͰUIςετͷೝࣝ߹Θͤ
ԿΛςετ͍ͨ͠ͷ͔࠶ͼࢥ͍ग़ͯ͠ΈΔ
ԿΛςετ͍ͨ͠ͷ͔࠶ͼࢥ͍ग़ͯ͠ΈΔ 1. UIʹϑΥʔΧεͨ͠ςετΛ͍ͨ͠ 2. UIΛ͏ςετΛ͍ͨ͠
▶︎1. UIʹϑΥʔΧεͨ͠ ςετΛ͍ͨ͠
XCUITestͰͳ͚Εग़དྷͳ͍ࣄ͔ʁ • ViewͷαΠζͦͷ্ʹࡌͬͯΔίϯϙʔωϯτͷҐஔͳͲ ϢχοτςετͰςετՄೳ • εΫϦʔϯγϣοτͳͲʹΑΔը૾ͰͷධՁ • iOSSnapshotTestcase https://github.com/uber/ios-snapshot-test-case
▶︎2. UIΛ͏ςετΛ͠ ͍ͨ
༷ʑͳཁҼ͕ςετΛͮ͠Β͘͢Δ • ΞϓϦ෦ͷঢ়ଶมԽ • ֎෦γεςϜͱͷ࿈ܞ
ΞϓϦ෦ͷঢ়ଶมԽΛ੍ޚ͢Δ launchArgumentslaunchEnvironmentΛͬͯىಈ࣌ʹঢ়ଶ ͷ੍ޚΛߦ͏ let app = XCUIApplication() app.launchArguments.append("UITest") app.launchEnvironment["GyozaAccessToken"] =
"GY0Za15PERfECTF00D" app.launchEnvironment["DidAgreeTos"] ɹɹɹ= "1"
ΞϓϦ෦ͷঢ়ଶมԽΛ੍ޚ͢Δ খωλ XCUIApplicationͷextensionͰݻ༗ͷઃఆΛΈ͘͢͢Δ let app = XCUIApplication() app.uitest() .isLoggedIn() .didAgreeTos()
.launch()
֎෦γεςϜͱͷ࿈ܞ ֎෦γεςϜͷ෦ΛϞοΫ·ͨελϒͯ͠ಈ࡞ͤ͞Δ • Embassy • SBTUITestTunnel • Wiremock
⚠ ɹ ͜ΕΒͷํ๏ΛऔΔࣄͰϢʔβͷૢ࡞͔Βԕ͔͟Γ·͢
༻๏༰ྔΛकͬͯਖ਼͘͠ޮՌతͳςετΛࢦ͠·͠ΐ͏ɻ
UIςετ͍ͭΔͷʁ • ݪଇͱͯ͠ϢχοτςετͳͲͷςετϐϥϛουͷԼ͔ ΒੵΈ্͛ͯߦ͘ํ͕·͍͠ʢROI͕ߴ͍ʣ • ↑Λཧղ্ͨ͠ͰUIςετͰΧόʔ͢ΔͷѱͰͳ͍ɻ ϦϑΝΫλϦϯάલͷϨΨγʔίʔυΛUIςετʹΑͬͯ ୲อ্ͨ͠ͰɺϦϑΝΫλϦϯάޙʹϢχοτςετΛॻ ͘
·ͱΊ • UIςετͳͲͷݴ༿ఆ͕ٛϒϨ͕ͪͳͷͰ࣠Λ࡞Ζ͏ • ݪଇʹଊΘΕΔඞཁͳ͍ɺجຊΛԡ্͑ͨ͞ͰͷΞϨϯδ ͍͍ͬͯɺޮՌతͩͱࢥ͑ࢼͯ͠ΈΕ͍͍͠ɺτ ϥΠΞϯυΤϥʔͯ͠վળ͍͖ͯ͠·͠ΐ͏
Ҏ্