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
DevFest Tokyo 2025 - Flutter のアプリアーキテクチャ現在地点
wasabeef
5
910
create_tableをしただけなのに〜囚われのuuid編〜
daisukeshinoku
0
250
Amazon S3 NYJavaSIG 2024-12-12
sullis
0
100
MCP with Cloudflare Workers
yusukebe
2
220
良いユニットテストを書こう
mototakatsu
8
2.3k
見えないメモリを観測する: PHP 8.4 `pg_result_memory_size()` とSQL結果のメモリ管理
kentaroutakeda
0
350
Cloudflare MCP ServerでClaude Desktop からWeb APIを構築
kutakutat
1
550
これでLambdaが不要に?!Step FunctionsのJSONata対応について
iwatatomoya
2
3.6k
命名をリントする
chiroruxx
1
410
Keeping it Ruby: Why Your Product Needs a Ruby SDK - RubyWorld 2024
envek
0
190
PHPで学ぶプログラミングの教訓 / Lessons in Programming Learned through PHP
nrslib
2
260
Fibonacci Function Gallery - Part 1
philipschwarz
PRO
0
220
Featured
See All Featured
It's Worth the Effort
3n
183
28k
Easily Structure & Communicate Ideas using Wireframe
afnizarnur
191
16k
The Success of Rails: Ensuring Growth for the Next 100 Years
eileencodes
44
6.9k
KATA
mclloyd
29
14k
Visualizing Your Data: Incorporating Mongo into Loggly Infrastructure
mongodb
44
9.3k
Designing Dashboards & Data Visualisations in Web Apps
destraynor
229
52k
Side Projects
sachag
452
42k
The Cost Of JavaScript in 2023
addyosmani
45
7k
Learning to Love Humans: Emotional Interface Design
aarron
273
40k
The World Runs on Bad Software
bkeepers
PRO
65
11k
What’s in a name? Adding method to the madness
productmarketing
PRO
22
3.2k
Fontdeck: Realign not Redesign
paulrobertlloyd
82
5.3k
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ςετͳͲͷݴ༿ఆ͕ٛϒϨ͕ͪͳͷͰ࣠Λ࡞Ζ͏ • ݪଇʹଊΘΕΔඞཁͳ͍ɺجຊΛԡ্͑ͨ͞ͰͷΞϨϯδ ͍͍ͬͯɺޮՌతͩͱࢥ͑ࢼͯ͠ΈΕ͍͍͠ɺτ ϥΠΞϯυΤϥʔͯ͠վળ͍͖ͯ͠·͠ΐ͏
Ҏ্