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
390
ソースコードから読み解く - 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
Honoの来た道とこれから
yusukebe
19
3k
レガシーな Android アプリのリアーキテクチャ戦略
oidy
1
170
飲食業界向けマルチプロダクトを実現させる開発体制とリアルな現状
hiroya0601
1
390
アジャイルを支えるテストアーキテクチャ設計/Test Architecting for Agile
goyoki
7
2.8k
デプロイを任されたので、教わった通りにデプロイしたら障害になった件 ~俺のやらかしを越えてゆけ~
techouse
52
32k
Vitest Browser Mode への期待 / Vitest Browser Mode
odanado
PRO
2
1.7k
C#/.NETのこれまでのふりかえり
tomokusaba
1
160
AWS IaCの注目アップデート 2024年10月版
konokenj
3
3.1k
Snowflake x dbtで作るセキュアでアジャイルなデータ基盤
tsoshiro
2
430
CSC305 Lecture 13
javiergs
PRO
0
130
Amazon Neptuneで始めてみるグラフDB-OpenSearchによるグラフの全文検索-
satoshi256kbyte
4
320
Kaigi on Rails 2024 - Rails APIモードのためのシンプルで効果的なCSRF対策 / kaigionrails-2024-csrf
corocn
5
3.4k
Featured
See All Featured
Building a Scalable Design System with Sketch
lauravandoore
459
33k
"I'm Feeling Lucky" - Building Great Search Experiences for Today's Users (#IAC19)
danielanewman
226
22k
Build your cross-platform service in a week with App Engine
jlugia
229
18k
Bootstrapping a Software Product
garrettdimon
PRO
305
110k
Code Reviewing Like a Champion
maltzj
519
39k
A designer walks into a library…
pauljervisheath
202
24k
VelocityConf: Rendering Performance Case Studies
addyosmani
325
24k
Art, The Web, and Tiny UX
lynnandtonic
296
20k
Faster Mobile Websites
deanohume
304
30k
CoffeeScript is Beautiful & I Never Want to Write Plain JavaScript Again
sstephenson
159
15k
Unsuck your backbone
ammeep
668
57k
The MySQL Ecosystem @ GitHub 2015
samlambert
250
12k
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.