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
「今のプロジェクトいろいろ大変なんですよ、app/services とかもあって……」/After Kaigi on Rails 2024 LT Night
junk0612
5
2.2k
ActiveSupport::Notifications supporting instrumentation of Rails apps with OpenTelemetry
ymtdzzz
1
230
Flutterを言い訳にしない!アプリの使い心地改善テクニック5選🔥
kno3a87
1
190
みんなでプロポーザルを書いてみた
yuriko1211
0
260
『ドメイン駆動設計をはじめよう』のモデリングアプローチ
masuda220
PRO
8
540
どうして僕の作ったクラスが手続き型と言われなきゃいけないんですか
akikogoto
1
120
受け取る人から提供する人になるということ
little_rubyist
0
230
Amazon Qを使ってIaCを触ろう!
maruto
0
410
見せてあげますよ、「本物のLaravel批判」ってやつを。
77web
7
7.8k
Outline View in SwiftUI
1024jp
1
330
Contemporary Test Cases
maaretp
0
140
ローコードSaaSのUXを向上させるためのTypeScript
taro28
1
620
Featured
See All Featured
Art, The Web, and Tiny UX
lynnandtonic
297
20k
The Straight Up "How To Draw Better" Workshop
denniskardys
232
140k
Templates, Plugins, & Blocks: Oh My! Creating the theme that thinks of everything
marktimemedia
26
2.1k
Done Done
chrislema
181
16k
The Pragmatic Product Professional
lauravandoore
31
6.3k
Documentation Writing (for coders)
carmenintech
65
4.4k
Keith and Marios Guide to Fast Websites
keithpitt
409
22k
Understanding Cognitive Biases in Performance Measurement
bluesmoon
26
1.4k
A designer walks into a library…
pauljervisheath
204
24k
Making Projects Easy
brettharned
115
5.9k
Designing Dashboards & Data Visualisations in Web Apps
destraynor
229
52k
Large-scale JavaScript Application Architecture
addyosmani
510
110k
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.