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
82
iOSアプリ開発を始めよう
tamaki
0
120
詳解xcresult.pdf
tamaki
0
290
メルペイでのリグレッションテスト自動化推進のこれまでとこれから
tamaki
0
680
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
シールドクラスをはじめよう / Getting Started with Sealed Classes
mackey0225
4
640
Amazon Bedrock Agentsを用いてアプリ開発してみた!
har1101
0
330
광고 소재 심사 과정에 AI를 도입하여 광고 서비스 생산성 향상시키기
kakao
PRO
0
170
よくできたテンプレート言語として TypeScript + JSX を利用する試み / Using TypeScript + JSX outside of Web Frontend #TSKaigiKansai
izumin5210
6
1.7k
Kaigi on Rails 2024 〜運営の裏側〜
krpk1900
1
200
レガシーシステムにどう立ち向かうか 複雑さと理想と現実/vs-legacy
suzukihoge
14
2.2k
EventSourcingの理想と現実
wenas
6
2.3k
ふかぼれ!CSSセレクターモジュール / Fukabore! CSS Selectors Module
petamoriken
0
150
CSC509 Lecture 11
javiergs
PRO
0
180
Duckdb-Wasmでローカルダッシュボードを作ってみた
nkforwork
0
120
ECS Service Connectのこれまでのアップデートと今後のRoadmapを見てみる
tkikuc
2
250
OnlineTestConf: Test Automation Friend or Foe
maaretp
0
110
Featured
See All Featured
Typedesign – Prime Four
hannesfritz
40
2.4k
Building a Scalable Design System with Sketch
lauravandoore
459
33k
Speed Design
sergeychernyshev
24
610
Exploring the Power of Turbo Streams & Action Cable | RailsConf2023
kevinliebholz
27
4.3k
The Language of Interfaces
destraynor
154
24k
Raft: Consensus for Rubyists
vanstee
136
6.6k
Mobile First: as difficult as doing things right
swwweet
222
8.9k
The Art of Programming - Codeland 2020
erikaheidi
52
13k
ピンチをチャンスに:未来をつくるプロダクトロードマップ #pmconf2020
aki_iinuma
109
49k
Building an army of robots
kneath
302
43k
Testing 201, or: Great Expectations
jmmastey
38
7.1k
How to Ace a Technical Interview
jacobian
276
23k
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ςετͳͲͷݴ༿ఆ͕ٛϒϨ͕ͪͳͷͰ࣠Λ࡞Ζ͏ • ݪଇʹଊΘΕΔඞཁͳ͍ɺجຊΛԡ্͑ͨ͞ͰͷΞϨϯδ ͍͍ͬͯɺޮՌతͩͱࢥ͑ࢼͯ͠ΈΕ͍͍͠ɺτ ϥΠΞϯυΤϥʔͯ͠վળ͍͖ͯ͠·͠ΐ͏
Ҏ্