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
850
標準パッケージにおけるテストでの利用例から学ぶ 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
410
ソースコードから読み解く - 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
採用事例の少ないSvelteを選んだ理由と それを正解にするためにやっていること
oekazuma
2
1k
命名をリントする
chiroruxx
1
410
Stackless и stackful? Корутины и асинхронность в Go
lamodatech
0
760
CSC305 Lecture 26
javiergs
PRO
0
140
CQRS+ES の力を使って効果を感じる / Feel the effects of using the power of CQRS+ES
seike460
PRO
0
130
103 Early Hints
sugi_0000
1
230
良いユニットテストを書こう
mototakatsu
8
2.3k
責務を分離するための例外設計 - PHPカンファレンス 2024
kajitack
6
890
Итераторы в Go 1.23: зачем они нужны, как использовать, и насколько они быстрые?
lamodatech
0
770
なまけものオバケたち -PHP 8.4 に入った新機能の紹介-
tanakahisateru
1
120
創造的活動から切り拓く新たなキャリア 好きから始めてみる夜勤オペレーターからSREへの転身
yjszk
1
130
StarlingMonkeyを触ってみた話 - 2024冬
syumai
3
270
Featured
See All Featured
Practical Tips for Bootstrapping Information Extraction Pipelines
honnibal
PRO
10
810
YesSQL, Process and Tooling at Scale
rocio
169
14k
Statistics for Hackers
jakevdp
796
220k
Raft: Consensus for Rubyists
vanstee
137
6.7k
JavaScript: Past, Present, and Future - NDC Porto 2020
reverentgeek
47
5.1k
Building Flexible Design Systems
yeseniaperezcruz
327
38k
The Psychology of Web Performance [Beyond Tellerrand 2023]
tammyeverts
45
2.2k
Save Time (by Creating Custom Rails Generators)
garrettdimon
PRO
28
900
Designing Experiences People Love
moore
138
23k
Documentation Writing (for coders)
carmenintech
66
4.5k
ReactJS: Keep Simple. Everything can be a component!
pedronauck
665
120k
RailsConf 2023
tenderlove
29
940
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.