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
850
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
88
iOSアプリ開発を始めよう
tamaki
0
130
詳解xcresult.pdf
tamaki
0
310
メルペイでのリグレッションテスト自動化推進のこれまでとこれから
tamaki
0
690
JPQRによって変わる日本のQRコード決済
tamaki
0
250
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.6k
Asynchronous Testing in XCTest
tamaki
0
380
Other Decks in Programming
See All in Programming
バグを見つけた?それAppleに直してもらおう!
uetyo
0
170
わたしの星のままで一番星になる ~ 出産を機にSIerからEC事業会社に転職した話 ~
kimura_m_29
0
180
ドメインイベント増えすぎ問題
h0r15h0
1
180
14 Years of iOS: Lessons and Key Points
seyfoyun
1
770
ソフトウェアの振る舞いに着目し 複雑な要件の開発に立ち向かう
rickyban
0
890
開発者とQAの越境で自動テストが増える開発プロセスを実現する
92thunder
1
180
Итераторы в Go 1.23: зачем они нужны, как использовать, и насколько они быстрые?
lamodatech
0
700
Refactor your code - refactor yourself
xosofox
1
260
命名をリントする
chiroruxx
1
390
menu基盤チームによるGoogle Cloudの活用事例~Application Integration, Cloud Tasks編~
yoshifumi_ishikura
0
110
Go の GC の不得意な部分を克服したい
taiyow
2
770
rails stats で紐解く ANDPAD のイマを支える技術たち
andpad
1
290
Featured
See All Featured
[RailsConf 2023] Rails as a piece of cake
palkan
53
5k
Testing 201, or: Great Expectations
jmmastey
40
7.1k
Templates, Plugins, & Blocks: Oh My! Creating the theme that thinks of everything
marktimemedia
28
2.1k
Code Reviewing Like a Champion
maltzj
520
39k
Easily Structure & Communicate Ideas using Wireframe
afnizarnur
191
16k
XXLCSS - How to scale CSS and keep your sanity
sugarenia
247
1.3M
Building a Scalable Design System with Sketch
lauravandoore
460
33k
Stop Working from a Prison Cell
hatefulcrawdad
267
20k
Building Your Own Lightsaber
phodgson
103
6.1k
Intergalactic Javascript Robots from Outer Space
tanoku
270
27k
Music & Morning Musume
bryan
46
6.2k
Understanding Cognitive Biases in Performance Measurement
bluesmoon
26
1.5k
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ςετͳͲͷݴ༿ఆ͕ٛϒϨ͕ͪͳͷͰ࣠Λ࡞Ζ͏ • ݪଇʹଊΘΕΔඞཁͳ͍ɺجຊΛԡ্͑ͨ͞ͰͷΞϨϯδ ͍͍ͬͯɺޮՌతͩͱࢥ͑ࢼͯ͠ΈΕ͍͍͠ɺτ ϥΠΞϯυΤϥʔͯ͠վળ͍͖ͯ͠·͠ΐ͏
Ҏ্