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
開発者とQAの越境で自動テストが増える開発プロセスを実現する
92thunder
1
180
短期間での新規プロダクト開発における「コスパの良い」Goのテスト戦略」 / kamakura.go
n3xem
2
170
「とりあえず動く」コードはよい、「読みやすい」コードはもっとよい / Code that 'just works' is good, but code that is 'readable' is even better.
mkmk884
3
120
Security_for_introducing_eBPF
kentatada
0
110
20年もののレガシープロダクトに 0からPHPStanを入れるまで / phpcon2024
hirobe1999
0
450
Cloudflare MCP ServerでClaude Desktop からWeb APIを構築
kutakutat
1
540
선언형 UI에서의 상태관리
l2hyunwoo
0
150
Symfony Mapper Component
soyuka
2
730
Keeping it Ruby: Why Your Product Needs a Ruby SDK - RubyWorld 2024
envek
0
180
テストコード文化を0から作り、変化し続けた組織
kazatohiei
2
1.5k
SymfonyCon Vienna 2025: Twig, still relevant in 2025?
fabpot
3
1.2k
Monixと常駐プログラムの勘どころ / Scalaわいわい勉強会 #4
stoneream
0
270
Featured
See All Featured
Design and Strategy: How to Deal with People Who Don’t "Get" Design
morganepeng
127
18k
Raft: Consensus for Rubyists
vanstee
137
6.7k
Automating Front-end Workflow
addyosmani
1366
200k
Why You Should Never Use an ORM
jnunemaker
PRO
54
9.1k
The Cult of Friendly URLs
andyhume
78
6.1k
Building an army of robots
kneath
302
44k
How GitHub (no longer) Works
holman
311
140k
Responsive Adventures: Dirty Tricks From The Dark Corners of Front-End
smashingmag
251
21k
The Psychology of Web Performance [Beyond Tellerrand 2023]
tammyeverts
45
2.2k
Code Reviewing Like a Champion
maltzj
520
39k
ReactJS: Keep Simple. Everything can be a component!
pedronauck
665
120k
No one is an island. Learnings from fostering a developers community.
thoeni
19
3k
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.