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
UIテストコードの保守性を上げるリファクタリングTIPS/ios-refactor-uitest
Search
Yusuke Hosonuma
June 19, 2017
Programming
4
2.7k
UIテストコードの保守性を上げるリファクタリングTIPS/ios-refactor-uitest
Yusuke Hosonuma
June 19, 2017
Tweet
Share
More Decks by Yusuke Hosonuma
See All by Yusuke Hosonuma
KotlinTest で始める Property-based Testing/kotlintest-property-based-testing
yusukehosonuma
2
1.4k
Marzipan の正体は何だったのか そして SwiftUI の衝撃/wwdc19_marzipan_swiftui
yusukehosonuma
2
840
標準パッケージにおけるテストでの利用例から学ぶ testing / quick パッケージ/golang-testing-quick
yusukehosonuma
4
11k
Swift で ParameterizedTest をやってみた話/swift-parameterized-test
yusukehosonuma
4
2k
Property-based test beginning with SwiftCheck
yusukehosonuma
1
5.4k
XCTest(再)入門/reintroduction-to-xctest
yusukehosonuma
0
400
ソースコードから読み解く - Quick はどのように実装されているのか?/quick-code-reading
yusukehosonuma
7
11k
Swift 4.2 はどのような進化をしているのか/whats-new-swift42
yusukehosonuma
16
14k
HTTPモックライブラリ「Mockingjay」を使ってみた話/swift-mockingjay
yusukehosonuma
5
3.7k
Other Decks in Programming
See All in Programming
subpath importsで始めるモック生活
10tera
0
300
弊社の「意識チョット低いアーキテクチャ」10選
texmeijin
5
24k
型付き API リクエストを実現するいくつかの手法とその選択 / Typed API Request
euxn23
8
2.2k
AI時代におけるSRE、 あるいはエンジニアの生存戦略
pyama86
6
1.1k
AWS IaCの注目アップデート 2024年10月版
konokenj
3
3.3k
Pinia Colada が実現するスマートな非同期処理
naokihaba
4
220
レガシーシステムにどう立ち向かうか 複雑さと理想と現実/vs-legacy
suzukihoge
14
2.2k
WebフロントエンドにおけるGraphQL(あるいはバックエンドのAPI)との向き合い方 / #241106_plk_frontend
izumin5210
4
1.4k
聞き手から登壇者へ: RubyKaigi2024 LTでの初挑戦が 教えてくれた、可能性の星
mikik0
1
120
What’s New in Compose Multiplatform - A Live Tour (droidcon London 2024)
zsmb
1
470
CSC509 Lecture 11
javiergs
PRO
0
180
Flutterを言い訳にしない!アプリの使い心地改善テクニック5選🔥
kno3a87
1
140
Featured
See All Featured
How to Ace a Technical Interview
jacobian
276
23k
Scaling GitHub
holman
458
140k
Building a Modern Day E-commerce SEO Strategy
aleyda
38
6.9k
Build The Right Thing And Hit Your Dates
maggiecrowley
33
2.4k
Building Better People: How to give real-time feedback that sticks.
wjessup
364
19k
What's new in Ruby 2.0
geeforr
343
31k
Let's Do A Bunch of Simple Stuff to Make Websites Faster
chriscoyier
506
140k
Designing Experiences People Love
moore
138
23k
Designing on Purpose - Digital PM Summit 2013
jponch
115
7k
The Illustrated Children's Guide to Kubernetes
chrisshort
48
48k
10 Git Anti Patterns You Should be Aware of
lemiorhan
654
59k
Code Review Best Practice
trishagee
64
17k
Transcript
Copyright (C) DeNA Co.,Ltd. All Rights Reserved. potatotips #41 2017/06/19(Mon)
ࡉপ༞հ@DeNA UIςετίʔυͷอकੑΛ্͛Δ ϦϑΝΫλϦϯάTips 1
▪ Yusuke Hosonumaʢ@tobi462ʣ • ॴଐ ⁃ %F/"48&5άϧʔϓςετج൫νʔϜ • ܦྺ ⁃
લུɺ݄ʹ%F/"48&5άϧʔϓʹ+PJO • ීஈͷۀ ⁃ όʔδϣϯɾΞοϓࣗಈݕূγεςϜʢϚεςΟϑʣͷ։ൃ ⁃ ΞϓϦͷςετʹ·ͭΘΔௐ͍ࠪΖ͍Ζ • ଞ ⁃ ͱ͔͖Ͱ͢ ࣗݾհ Copyright (C) DeNA Co.,Ltd. All Rights Reserved. 2
ࠓɺ͢͜ͱ 3 Copyright (C) DeNA Co.,Ltd. All Rights Reserved.
6*ςετίʔυͷ ϦϑΝΫλϦϯά5JQT 4 Copyright (C) DeNA Co.,Ltd. All Rights Reserved.
ରը໘ʢϩάΠϯը໘ʣ 5 Copyright (C) DeNA Co.,Ltd. All Rights Reserved. ʙςετͷྲྀΕʙ
1. ϝʔϧΞυϨεΛೖྗ 2. ύεϫʔυΛೖྗ 3. ϩάΠϯϘλϯΛλοϓ 4. ϩάΠϯ͕ޭͯ͠ɺ ྃը໘ભҠ͢Δ
γϯϓϧʹॻ͍ͨίʔυશମʢ͝ࢀߟʣ 6 Copyright (C) DeNA Co.,Ltd. All Rights Reserved.
ೖྗॲཧͷϝιουԽ 7 Copyright (C) DeNA Co.,Ltd. All Rights Reserved.
˚ ೖྗॲཧ tap() ͱ typeText() ͷ྆ํ͕ඞཁ 8 Copyright (C) DeNA
Co.,Ltd. All Rights Reserved. ຖճηοτͰݺͼग़͢ඞཁ͕͋ͬͯɾɾɾ
ڞ௨Խ͠Α͏ʂ 9 Copyright (C) DeNA Co.,Ltd. All Rights Reserved.
⭕ ೖྗॲཧΛextensionͰϝιουԽ͢Δ 10 Copyright (C) DeNA Co.,Ltd. All Rights Reserved.
XCUIElementΛ֦ு ςετͱͯ͠Γ͍ͨຊ࣭͕Έ͑͘͢ͳͬͨʂ
࣮͜Ε͚ͩͰ͕͋Δ 11 Copyright (C) DeNA Co.,Ltd. All Rights Reserved.
˚ inputText() ͰΤϥʔ͕ൃੜͨ͠ͱ͖ 12 Copyright (C) DeNA Co.,Ltd. All Rights
Reserved. Ͳ͜Ͱࣦഊͨ͠ͷ͔͔Βͳ͍ɾɾɾorz
ϝιουδϟϯϓͯ͠ ίʔυΛ͍ͬͯ͘ͱɾɾɾ 13 Copyright (C) DeNA Co.,Ltd. All Rights Reserved.
˚ inputText() ͷதͰམ͍ͪͯͨɾɾɾ 14 Copyright (C) DeNA Co.,Ltd. All Rights
Reserved. ΤϥʔͷҐஔ͕ςετϝιουຊମ͔Β Ε͍ͯͯඇৗʹ͔ΓͮΒ͍ ෳ͜͜Ͱམ͍ͪͯͨ߹ɺ Τϥʔ͕͜͜ʹू͞Εͯ͠·͏
9DPEF্ͷϩάͰݟΔʁ 15 Copyright (C) DeNA Co.,Ltd. All Rights Reserved.
˚ ৄ͘͠ग़͍ͯΔɾɾɾ͚Ͳ 16 Copyright (C) DeNA Co.,Ltd. All Rights Reserved.
ࣦഊͨ͠Օॴʹδϟϯϓग़དྷͳ͍͠ɺ ԿΑΓख͕ܰ͞Γͳ͍ɾɾɾ
ڞ௨ԽͰ͖͚ͨͲ ࣦഊ࣌ͷௐࠪίετ Ή͠Ζ্͕ͬͯΔɾɾɾʂʁ 17 Copyright (C) DeNA Co.,Ltd. All Rights
Reserved.
ʺސ٬͕ٻΊ͍ͯͨͷ 18 Copyright (C) DeNA Co.,Ltd. All Rights Reserved.
ೖྗॲཧͷϝιουԽ ʢύʔτ̎ʣ 19 Copyright (C) DeNA Co.,Ltd. All Rights Reserved.
ސ٬ͷٻΊ͍ͯΔͷ 20 Copyright (C) DeNA Co.,Ltd. All Rights Reserved.
⭕ ސ٬ͷٻΊ͍ͯͨͷ 21 Copyright (C) DeNA Co.,Ltd. All Rights Reserved.
͜͜ͷߦʹΤϥʔ͕ग़ͯཉ͍͠ʂ
ʢͨͿΜʣ ͋·ΓΒΕ͍ͯͳ͍͜ͱ 22 Copyright (C) DeNA Co.,Ltd. All Rights Reserved.
9$5"TTFSUܥͷϝιου ࣦഊҐஔΛࢦఆͰ͖Δ 23 Copyright (C) DeNA Co.,Ltd. All Rights Reserved.
˒ XCTAssert Ͱ file ͱ line ͕ࢦఆͰ͖Δ 24 Copyright (C)
DeNA Co.,Ltd. All Rights Reserved. ίʔυิʹग़ͳ͍͚Ͳ fileͱline͕ࢦఆͰ͖Δʂ ͪͳΈʹAPIϦϑΝϨϯεʹॻ͍ͯ͋Δ ͚ΕͲ͍͠Θ͟Θ͟ݟͳ͍
˒ ΤϥʔͷҐஔม͑ΒΕΔ 25 Copyright (C) DeNA Co.,Ltd. All Rights Reserved.
1ߦखલͰΤϥʔ͕ى͖ͨ͜ͱʹ͢Δ͜ͱ ͜ΕΛར༻͢Ε దͳҐஔʹΤϥʔใΛදࣔͰ͖Δʂ
⭕ ಠࣗͷΞαʔγϣϯΛՃ͢Δ 26 Copyright (C) DeNA Co.,Ltd. All Rights Reserved.
σϑΥϧτҾͱͯ͠ #file ͱ #line Λड͚औΓɺ ཁૉ͕ͳ͔ͬͨ߹ʹ XCTFail Ͱࣦഊͤ͞Δ
⭕ ͖ͬ͞ͱಉ͡ςετΛ࣮ߦͯ͠ΈΔͱɾɾɾ 27 Copyright (C) DeNA Co.,Ltd. All Rights Reserved.
Τϥʔ͕ൃੜͨ͠Ґஔ͕͔Γ͘͢ͳͬͨʂ ϝοηʔδʂ
ސ٬ͷٻΊ͍ͯͨͷ 28 Copyright (C) DeNA Co.,Ltd. All Rights Reserved. ͪͳΈʹUIςετҎ֎Ͱ͑ΔςΫχοΫ
·ͱΊ 29 Copyright (C) DeNA Co.,Ltd. All Rights Reserved.
·ͱΊ ڞ௨తͳॲཧϝιουԽ͠Α͏ ಠࣗͷΞαʔγϣϯΛ͍ΕͯௐࠪίετΛԼ͛Α͏ ɾগ͠ͷ͚ͩͰςετίʔυಡΈ͘͢ͳΔ ɾςετࣦഊ࣌ͷௐࠪݮΒͤΔ 30 Copyright (C) DeNA Co.,Ltd.
All Rights Reserved.
&OKPZUIF5FTU 31 Copyright (C) DeNA Co.,Ltd. All Rights Reserved.