Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Sign up for free
Menu
Search
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Pricing
Search
Sign in
Sign up for free
"Meet Swift Testing" & "Go further with Swift T...
Search
log5
July 02, 2024
Technology
390
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
"Meet Swift Testing" & "Go further with Swift Testing" in 5 min
「集まれSwift好き!Swift愛好会スピンオフ WWDC24セッション要約会 @ DeNA」 における発表資料
log5
July 02, 2024
More Decks by log5
See All by log5
Foundation Modelsの歌声によせて 〜 オンデバイス推論から聞こえてくる自動作曲の可能性
judau
0
210
Summary of the "Migrate to Swift Testing"
judau
0
29
App Clip 5年史: 萌動と停滞のクロニクル
judau
0
3.2k
"Record, replay, and review: UI automation with Xcode" の要約
judau
1
260
懐かしきCaboChaのレシピをもう一度
judau
0
170
App Clipの魔法: iOSデザイン開発の新時代
judau
4
9k
AppCodeのサ終から半年後
judau
1
260
Aquaの波紋によせて
judau
0
190
iOSは自動作曲の夢を見るか
judau
1
2.1k
Other Decks in Technology
See All in Technology
AgentCore Runtime上にAgentic Coding基盤を構築・展開する際の設計ポイントと限界点 / Design considerations and limitations when building an agentic coding platform on AgentCore Runtime
har1101
5
710
データ_AIの事業の勝敗をわけるもの
nek0128
1
480
AI coding 整合正規方法
philipz
0
530
LLMに渡さなかった仕事
nanaism
0
1.4k
CLIライブラリ開発を支える技術
htnabe
0
150
バイブコーディング時代のWebアプリ開発入門~Cloud Runで学ぶセキュアなビルドとデプロイ
waiwai2111
1
140
ボードゲームの遊び相手をFoundation Modelsで作る / iOSDC Japan 2026
genda
0
120
アクセスキーこわい やめかたと漏らさない工夫
sassssan68
1
670
Oracle Cloud Infrastructure(OCI):Onboarding Session(はじめてのOCI/Oracle Supportご利⽤ガイド)
oracle4engineer
PRO
2
20k
GoのInterface内部構造から学ぶ!最高パフォーマンスを出すコード設計
yappli_developers
1
270
aws-iot-platform-architecture-use-cases.pdf
ma2shita
0
560
積み重なった技術負債への挑戦 〜初手としての全社ゴト化〜
techtekt
PRO
0
1.6k
Featured
See All Featured
Kristin Tynski - Automating Marketing Tasks With AI
techseoconnect
PRO
0
520
YesSQL, Process and Tooling at Scale
rocio
174
15k
Building Adaptive Systems
keathley
44
3.2k
Crafting Experiences
bethany
1
350
The Organizational Zoo: Understanding Human Behavior Agility Through Metaphoric Constructive Conversations (based on the works of Arthur Shelley, Ph.D)
kimpetersen
PRO
0
460
Producing Creativity
orderedlist
PRO
348
41k
Dealing with People You Can't Stand - Big Design 2015
cassininazir
367
27k
KATA
mclloyd
PRO
35
16k
Building Flexible Design Systems
yeseniaperezcruz
330
41k
The State of eCommerce SEO: How to Win in Today's Products SERPs - #SEOweek
aleyda
2
12k
CoffeeScript is Beautiful & I Never Want to Write Plain JavaScript Again
sstephenson
162
16k
Hiding What from Whom? A Critical Review of the History of Programming languages for Music
tomoyanonymous
3
1.3k
Transcript
Meet Swift Testing Go further with Swift Testing log5 at
ू·ΕSwift͖ʂSwiftѪձεϐϯΦϑ WWDC24ηογϣϯཁձ @ DeNA Λ5Ͱཧղ͢Δ·ͱΊ
Meet Swift Testing
Swift Testing ͱ • SwiftίʔυͷςετΛ༰қ͔ͭڧྗʹ • Φʔϓϯιʔεύοέʔδ
ϞμϯͳSwiftͱͷ౷߹ • Async/await Actor isolation Λαϙʔτ • ϚΫϩʹΑΔৄࡉͳΤϥʔϨϙʔτ
ॊೈͳςετઃܭ JUnitͱ͔TestNGͱ͔ͰݟͨΞϨ • ͖݅ςετ࣮ߦ • ΧελϜλάʹΑΔςετͷάϧʔϓԽ • ύϥϝʔλϥΠζυɾςετ • ෳͷҾͰςετΛ܁Γฦ࣮͠ߦ
XCTestͱԿ͕ҧ͏? • ΑΓ໌ࣔతͳςετࢦఆ • ͏ testͳΜͱ͔ͱ͍͏ϝιου͡Όͳ͍͍ͯ͘ • γϯϓϧͳظνΣοΫ • XCTAssertGreaterThanͳΜͱ͔֮͑ͳͯ͘ྑ͍
• structͰςετεΠʔτ͕ॻ͚Δ
ΦʔϓϯιʔεͱϚϧνϓϥοτϑΥʔϜ • ιʔείʔυ͕GitHub্ʹ • ίϛϡχςΟओಋͷ։ൃ • AppleϓϥοτϑΥʔϜ͚ͩͰͳ͘LinuxWindowsαϙʔτ
ϙΠϯτ • ςετؔ (@Test attribute) • ظνΣοΫ (#expectϚΫϩ) • τϨΠτ
(@available ͷؒΈ͍ͨͳͷ) • ςετεΠʔτ (@Suite ͰςετΛάϧʔϓԽ)
Swift Testing ʹ͍ͭͯ ཁ͢Δʹ • Swift Testing • Xcode 16Swift
Package Managerͱ౷߹ • طଘͷXCTestͱڞଘՄೳ • ςετͷ্࣭ͱޮԽ
Go further with Swift Testing
Swift Testingͷৄࡉ • Swift TestingͰςετΛڧԽʂ • Մಡੑɺཏੑɺ৫Խɺฒྻ࣮ߦ
දݱྗUP • ΤϥʔϋϯυϦϯάͷςετ͕༰қͳ expect throwsϚΫϩ • OptionalͷݕূʹϐολϦͳ required • ͳΜ͔όάͰ௨ͤͳ͍ͱ͖
withKnownIssue • CustomTestStringConvertible ͰΘ͔Γ͍͢Τϥʔϝοηʔδ • ςετ࣌ͷϩάΛ͖ʹͰ͖Δ → ςετϨϙʔτಡΈ͍͢
ύϥϝʔλϥΠζυɾςετ ੲ͔Β͜ΕຊޠͰͳΜ͍ͯ͏ͷ͔Α͘Θ͔ΒΜ • 1ͭͷςετؔͰෳͷέʔεΛΧόʔ • For-each෦ͰͷΞαʔγϣϯ͕खܰʹ • ෳͷೖྗύϥϝʔλʹରԠ • ςετέʔεͷΈ߹ΘͤΛࣗಈੜ
• (ΦʔϧϖΞ๏ʢϖΞϫΠζ๏ʣ͕ग़ͯ͘Δ͔ͱظ͚ͨ͠Ͳҧͬͨ)
৫Խ (ͬͯ༁ޠ͋ͬͯΔʁ) • ωετ͞ΕͨςετεΠʔτ • @Tag ʹΑΔςετͷؔ࿈͚ͱ࣮ߦ੍ޚ • Xcodeͷ৽ػೳΛ׆༻ͨ͠λάϕʔεςετཧ
ςετͷฒྻ࣮ߦ • σϑΥϧτͰฒྻ࣮ߦ → ߴԽ • ςετؒͷӅΕͨґଘ͕ؔݟ͔ͭΔ • ͍͖ͳΓγϟοϑϧͰ͖ͳ͍ͳΒ.serializedτϨΠτͰஞ࣮࣍ߦ
ඇಉظςετ • Swift Concurrencyͱͷ౷߹ • try await confirmation • Completion
Handler event handler ͷςετʹͽͬͨΓ • (ݸਓతʹ5લʹObjective-CͷϓϩδΣΫτͰཉ͔ͬͨ͠ʣ
Swift Testing ͷৄࡉ ͭ·ΓͲΏ͜ͱ • Swift Testing • ςετίʔυͷ࣭ͱޮΛେ෯ʹ্ •
Xcodeͱ౷߹͞Ε͍͍ͯͯ͢ (Xcodeࣗମ͕͍͍͔͢ॾઆ͕) • Test PlanXcode CloudͰ׆༂ • ΑΓ৴པੑͷߴ͍ιϑτΣΞΛޮతʹ։ൃ
ϫΠͦΖͦΖiOS։ൃͨ͘͠ͳ͖ͬͯͨ(´ɾТɾʆ) Happy Testing!