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
Search
Shingo Tamaki
March 31, 2019
Technology
5
1.8k
What do you want to test with UI Test
I considered about what a UI test is.
Shingo Tamaki
March 31, 2019
Tweet
Share
More Decks by Shingo Tamaki
See All by Shingo Tamaki
沖縄モバイルアプリ開発勉強会#1
tamaki
0
74
iOSアプリ開発を始めよう
tamaki
0
110
詳解xcresult.pdf
tamaki
0
280
メルペイでのリグレッションテスト自動化推進のこれまでとこれから
tamaki
0
660
What do you want to test with UI Test v2
tamaki
2
830
JPQRによって変わる日本のQRコード決済
tamaki
0
240
What's New in Testing
tamaki
1
58
How to control state in UI Test
tamaki
4
2.5k
Asynchronous Testing in XCTest
tamaki
0
360
Other Decks in Technology
See All in Technology
【shownet.conf_】ShowNet x 宇宙ネットワーク
shownet
PRO
0
300
たった一人で始めた音楽制作が気がついたら会社公認の部活動になっていた話〜組織の垣根を超えるコラボレーションを実現するには〜 / On-KAG-bu
piyonakajima
0
150
分析者起点の企画を成功させた連携面の工夫
lycorptech_jp
PRO
1
220
Report of JAWS PANKRATION 2024, a global online event using Amazon IVS
yoshimi0227
1
130
DenoでもViteしたい!インポートパスのエイリアスを指定してラクラクアプリ開発
bengo4com
1
1.7k
スモールスタート、不都合な真実 〜 耳当たりの良い言葉に現場が振り回されないために/20240930-ssmjp-small-start
opelab
12
1.7k
【インフラエンジニアbooks】30分でわかる「AWS継続的セキュリティ実践ガイド」
hssh2_bin
4
900
スクラム導入の舞台裏:QAエンジニアがスクラムマスターになるまで
bubo1201
0
110
入門 バックアップ
ryuichi1208
13
4.2k
ORM と向き合う
hoto17296
7
5.9k
Webセキュリティのあるきかた
akiym
10
2.4k
Renovate ではじめる運用レスなライブラリ更新 / 令和最新版 他人に自慢したいヤバいCI/CD LT会 @ yabaibuki.dev #2
ponkio_o
PRO
1
130
Featured
See All Featured
Designing Dashboards & Data Visualisations in Web Apps
destraynor
228
52k
Large-scale JavaScript Application Architecture
addyosmani
509
110k
Building Applications with DynamoDB
mza
90
6k
Designing for Performance
lara
604
68k
Being A Developer After 40
akosma
84
590k
Raft: Consensus for Rubyists
vanstee
136
6.6k
Faster Mobile Websites
deanohume
304
30k
Fight the Zombie Pattern Library - RWD Summit 2016
marcelosomers
230
17k
Optimizing for Happiness
mojombo
375
69k
Clear Off the Table
cherdarchuk
91
320k
Code Reviewing Like a Champion
maltzj
519
39k
Templates, Plugins, & Blocks: Oh My! Creating the theme that thinks of everything
marktimemedia
26
2k
Transcript
͋ͳ͕ͨUIςετͰධՁ͍ͨ͠ͷ ɹ ԿͰ͔͢ʁ
ࣗݾհ ! ۄ৴ޛ iOS Engineer Testing/CIɾCD/HomeKit/IoT Organized try!Swift Tokyo 2019
Hosting Roppongi.swift
PEAKS͞Μ͔ΒʮiOSςετશॻʯΛग़͢͜ͱʹͳΓ·ͨ͠
Ͱɺ࢝Ί·͢
ఆٛʹϒϨΛײͨ͡ࣄͳ͍Ͱ͔͢ʁ
*ςετ
*ςετ γεςϜςετ/౷߹ςετ/݁߹ςετ/࿈݁ςετ/֎෦݁߹ς ετ/෦݁߹ςετ/ΠϯςάϨʔγϣϯςετ/֎෦ςετ/ ෦ςετ/ػೳςετ/E2Eςετ/Ϣχοτςετ/୯ମςετ/ε τϨεςετ/ಈతςετ/੩తςετ/ϗϫΠτϘοΫεςετ/ ϒϥοΫϘοΫεςετ/Ϣʔβʔςετ/डೖςετ/UIςετ/ ୳ࡧతςετ/ಉΫϥεςετ/ڥքςετ/σγδϣϯςʔ ϒϧςετ/Έ߹Θͤςετ/ঢ়ଶભҠςετ/σʔλϑϩʔς ετ/ΞυϗοΫςετ/ABςετ/ϦάϨογϣϯςετ/ճؼς
ςετʹؔΘΔ༻ޠ ςετٕ๏/ςετܭը/ςετ߲/ςετΞΠςϜ/ςετγφ ϦΦ/ςετεΟʔτ/ςετϨϕϧ/ςετϓϩηε/ςετ؍/ ςετઃܭ/ςετੳ/ςετఔ/ςετΧόϨοδ/ςετ ϕʔε/ελϒ/ϞοΫ/ςετμϒϧ/SUT/όά/ෆ۩߹/ܽؕ/ނ ো/ϑΥʔϧτ/ςεςΟϯά/νΣοΩϯά/ඇػೳςετ/ςετ λΠϓ/ςετۦಈ։ൃ/TDD/ςετϋʔωε/.....
None
༨ஊ: JSTQBͱ͔ͬͯΈΔͱָ͍͠Α http://jstqb.jp
ؓٳ
ςετϐϥϛου • UI • Service • Unit
UIςετΓ͍ͨਓ
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("loggedIn") app.launchArguments.append(contentsOf: ["-key",
"abc111222333"]) app.launchArguments.append(contentsOf: ["-skipLogin", "YES"]) app.launchEnvironment["TestMode"] = "UITest"
֎෦γεςϜͱͷ࿈ܞ ֎෦γεςϜͷ෦ΛϞοΫ·ͨελϒͯ͠ಈ࡞ͤ͞Δ • Embassy • SBTUITestTunnel • Wiremock
⚠ ɹ ͜ΕΒͷํ๏ΛऔΔࣄͰϢʔβͷૢ࡞͔Βԕ͔͟Γ·͢
༻๏༰ྔΛकͬͯਖ਼͘͠ޮՌతͰ͋ΔςετΛࢦ͠·͠ΐ͏ɻ
UIςετ͍ͭΔͷʁ • جຊతʹϢχοτςετͳͲͷςετϐϥϛουͷԼ͔Β ੵΈ্͛ͯߦ͘ͷ͕͍͍ • ↑Λཧղ্ͨ͠ͰUIςετͰΧόʔ͢ΔͷѱͰͳ͍ • ϨΨγʔίʔυͷ߹ɺϢχοτςετͷͨΊʹϦϑΝΫ λϦϯά͕ඞਢʹͳΔ͕UIςετԿͱ͔͔͚Δ߹͋ Δ
·ͱΊ • UIςετͳͲͷݴ༿ఆ͕ٛϒϨ͕ͪͳͷͰ࣠Λ࡞Ζ͏ • ఆٛʹଊΘΕΔඞཁͳ͍ɺجຊΛԡ্͑ͨ͞ͰͷΞϨϯδ ͍͍ͬͯͱࢥ͏Αʁ • ޮՌతͩͱࢥ͑ࢼͯ͠ΈΕ͍͍͠ɺτϥΠΞϯυΤϥʔ ͯ͠վળ͍͖ͯ͠·͠ΐ͏
Ҏ্