Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Sign up for free
Menu
Search
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Pricing
Search
Sign in
Sign up for free
XCUITestする時のTIPs 〜あなたを助けるXCUITestへ〜
Search
Sponsored
·
Your Podcast. Everywhere. Effortlessly.
Share. Educate. Inspire. Entertain. You do you. We'll handle the rest.
→
PoohSunny
May 22, 2017
Technology
3.2k
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
XCUITestする時のTIPs 〜あなたを助けるXCUITestへ〜
iOS Test Night #4
https://testnight.connpass.com/event/54316/
での発表資料です。
PoohSunny
May 22, 2017
More Decks by PoohSunny
See All by PoohSunny
ドレイファスモデルの紹介 / introduce Dreyfus model
poohsunny
1
1.8k
Make Work Visible in Agile2018 #LINE_DM
poohsunny
1
510
タウンワークをドライブさせるためになんちゃってアジャイルをやめた話 #devsumi #devsumiB / devsumi2018
poohsunny
30
47k
1 test 1 assert ?
poohsunny
0
520
XUTPから学ぶ記述性の高いユニットテスト 〜俺たちを助けるユニットテストへ〜 / xUTP in #xpjug
poohsunny
4
5.5k
コードに思いが伝わる
poohsunny
0
380
横浜タネマキでGebと握手! #yokohamagroovy
poohsunny
0
460
The "yummy" licenses.
poohsunny
0
260
ブラウザテストをサクサク自動化するためのGeb実践入門 #jjug_ccc
poohsunny
21
7.2k
Other Decks in Technology
See All in Technology
freeeらしさをAIとともに作る / Creating the freee Experience with AI
ymrl
0
210
Claude Code本は、どのように執筆チームで書かれたか
oikon48
1
340
全人類(ほぼ)AWS Organizations の上でAWSを利用している、その世界を知る話
htan
1
130
分析AIエージェントを育てる、動く環境を育てる
codatum
1
380
SDDの運用にめげずに向き合った話
sansantech
PRO
1
140
Codex概要
ymiya55
0
470
ハードウェアコンペでもAI駆動開発が進んでいる話
iotengineer22
1
490
生成AIを使って「人が」考える技術 ― AI時代の人機共想と実践ノウハウ|UNITT AC2026
ishiirikie
0
570
Essential architectural thinking (revised edition)
ufried
0
110
二歩目のフロントエンド・ウェブアクセシビリティ
camiha
2
160
3つのアプローチで目指す チームを強くするAI駆動開発
thkt
0
130
分析の民主化を支えるメタデータ整備の実践
kakehashi
PRO
3
1k
Featured
See All Featured
DevOps and Value Stream Thinking: Enabling flow, efficiency and business value
helenjbeal
2
400
For a Future-Friendly Web
brad_frost
184
10k
YesSQL, Process and Tooling at Scale
rocio
174
15k
Sharpening the Axe: The Primacy of Toolmaking
bcantrill
46
3k
Odyssey Design
rkendrick25
PRO
2
860
30 Presentation Tips
portentint
PRO
1
420
Principles of Awesome APIs and How to Build Them.
keavy
128
18k
職位にかかわらず全員がリーダーシップを発揮するチーム作り / Building a team where everyone can demonstrate leadership regardless of position
madoxten
69
66k
個人開発の失敗を避けるイケてる考え方 / tips for indie hackers
panda_program
123
22k
Information Architects: The Missing Link in Design Systems
soysaucechin
1
1.2k
Sam Torres - BigQuery for SEOs
techseoconnect
PRO
0
570
The Web Performance Landscape in 2024 [PerfNow 2024]
tammyeverts
12
1.3k
Transcript
XCUITest͢Δ࣌ͷ TIPs ʙ͋ͳͨΛॿ͚ΔXCUITestʙ @PoohSunny iOS Test Night #4
@PoohSunny { work: "σΟϕϩούʔ", company: "ϦΫϧʔτδϣϒζ", lang: ["Swift", "Java", "Groovy"],
community: [ "TDDBC", "Agile Samurai Base Camp", "ຊSeleniumϢʔβʔίϛϡχςΟ" ] }
Selenium͖1 1 ग़ॴɿٕज़ධࣾ
iOSॳΊͯ̍ ʢποίϛܴʂʣ
ΑΖ͘͠ ͓ئ͍͠·͢
UITestͷ
None
XCUITest ͍ͬͯ·͢
TIPsͷհ ଞͷςετϑϨʔϜϫʔΫͰ͑Δͣʂ
TIP1 Ͳ͜·Ͱςετ͢Ε͍͍Μ ͩorz
εϞʔΫςετ
1. جຊతͳಈઢ 2. མͪΔͱॏେো ʹͳΔ෦
TIP2 UIΛมߋͨ͠Βͨ͘͞Μͷς ετ͕͚ͯ͜͠·ͬͨorz
ϖʔδΦϒδΣΫτύλʔϯ Λར༻ͨ͠มߋͷہॴԽ ςετରͷϖʔδΛΦϒδΣΫτͱͯ͠ςετ ͔ΒΓ͠ɺϝϯςφϯεੑΛߴΊΔ2 2 http://www.seleniumhq.org/docs/06testdesign_considerations.jsp#page-object-design-pattern
ཁ3 • publicϝιου->ϖʔδ͕ఏڙ͢ΔαʔϏεΛ දݱ • ϖʔδͷ෦Λ࿐ग़͠ͳ͍Α͏ʹ͠·͢ • ҰൠతʹɺΞαʔγϣϯߦ͍·ͤΜ • ϝιουผͷPageObjectsΛฦ͠·͢
3 http://garbagetown.hatenablog.com/entry/2013/11/07/075011͔ΒҾ༻
σΟϨΫτϦ UITest |-- Module // ֤ϖʔδͰڞ௨͢Δ෦܈ |-- Screen // ϖʔδΦϒδΣΫτ
`-- Test // ࣮ࡍͷςετέʔε
αϯϓϧ class TopScreen: BaseScreen { required init(xcuiApplication: XCUIApplication) { super.init(xcuiApplication:
xcuiApplication) XCTAssert(app.navigationBars["τοϓ"].exists) } func ݕࡧϘλϯΛԡ͢() -> BaseScreen { app.navigationBars.buttons.elementBoundByIndex(0).tap() return ResultScreen(xcuiApplication: xcuiApplication) } }
TIP3 ͜ͷςετԿͯ͠Δͷ͔Θ͔ ΜͶʔorz
ςετͷՄಡੑΛ্͛Δ ྫ͑ར༻ϝιου໊Λຊޠʹ͢Δ func testۈΛબ͢Δ() { let τοϓϖʔδ = TopScreen(xcuiApplication: XCUIApplication())
τοϓϖʔδ.ಓݝΛબ͢Δ(Area.౦ژ) let ݕࡧ݁Ռϖʔδ = τοϓϖʔδ.ݕࡧ͢Δ() XCTAssert(ݕࡧ݁Ռϖʔδ.දࣔ͞Ε͍ͯΔ()) }
ϖʔδΦϒδΣΫτΛ ࡞ΓࠐΉ func testۈΛબ͢Δ() { let τοϓϖʔδ = TopScreen(xcuiApplication: XCUIApplication())
let ݕࡧ݁Ռϖʔδ = τοϓϖʔδ.Լه݅Ͱݕࡧ͢Δ(Area.౦ژ, "ϑϦʔϫʔυ") XCTAssert(ݕࡧ݁Ռϖʔδ.දࣔ͞Ε͍ͯΔ()) }
Given-When-Thenҙࣝͯ͠ ΈΔ func testۈΛબ͢Δ() { // given let τοϓϖʔδ =
TopScreen(xcuiApplication: XCUIApplication()) // when let ݕࡧ݁Ռϖʔδ = τοϓϖʔδ.Լه݅Ͱݕࡧ͢Δ(Area.౦ژ, "ϑϦʔϫʔυ") // then XCTAssert(ݕࡧ݁Ռϖʔδ.දࣔ͞Ε͍ͯΔ()) }
4 phase test4Ͱ Setup - Exercise - Verify - Teardown
3A5Ͱ Arrange - Act - Assert 5 http://xp123.com/articles/3a-arrange-act-assert/ 4 http://xunitpatterns.com/Four%20Phase%20Test.html
·ͱΊ • TIP1. Ͳ͜·Ͱςετ͢Δ͔໎ͬͨΒεϞʔΫ ςετ • TIP2. มߋΛہॴԽ͍ͨ͠ͳΒϖʔδΦϒδΣ Ϋτύλʔϯ •
TIP3. ՄಡੑΛ্͍͛ͨͳΒຊޠΛ͏ͷΛ ԀΘͳ͍
͓͠·͍ ʙ͋ͳͨΛॿ͚ΔXCUITestʙ