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
400
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
10年欲しかった音楽管理アプリを、AIと一緒に作りはじめた
judau
1
220
Foundation Modelsの歌声によせて 〜 オンデバイス推論から聞こえてくる自動作曲の可能性
judau
0
470
Summary of the "Migrate to Swift Testing"
judau
0
32
App Clip 5年史: 萌動と停滞のクロニクル
judau
0
3.3k
"Record, replay, and review: UI automation with Xcode" の要約
judau
1
280
懐かしきCaboChaのレシピをもう一度
judau
0
180
App Clipの魔法: iOSデザイン開発の新時代
judau
4
9.1k
AppCodeのサ終から半年後
judau
1
270
Aquaの波紋によせて
judau
0
190
Other Decks in Technology
See All in Technology
ゼロから作るWebアプリの新定番!?Amplify Gen 2 × AWS Blocksで実現する「開発速度とRDBの柔軟性のいいとこ取り」
amixedcolor
1
170
推論基盤と Scale-Up Interconnect の現状と制約から俯瞰する技術動向
markunet
2
840
サボる子はいねぇがー!AgentCoreハーネスの脆弱性に学ぶ、エージェントの入力バリデーション
iwamot
PRO
5
300
Kiro Crew の Bot (続く役目を任せる窓口) | 目指せ Kiro マスター 12
inariku
PRO
2
290
AIエージェントの監視、思考を見るか行動を見るか / Monitoring AI Agents: Thoughts or Actions
yusukeshimizu
2
170
Kiro 入門 (1 つのエージェントを、どの画面からでも) | 目指せ Kiro マスター 01
inariku
PRO
5
1.1k
Sizing, Benchmarking and Performance Tuning Apache Flink Clusters
rmetzger
0
130
Active Directory と Entra ID のむむむな関係
murachiakira
PRO
3
1.7k
AIがGISを代替する日:〜すべてをAIが創る時代に、私たちがFOSS4Gに関わる意味〜
lehupa
1
210
続・ソフトウェアアーキテクトのための意思決定術: Decision Readiness, Revisited — When AI Changes the Economics of Software Architecture
snoozer05
PRO
9
2.7k
Gifu WordPress Meetup #200 に向けて、私たちには何ができるだろうか?/ 2026-11-07 Gifu WordPress Meetup
torounit
0
210
会社説明資料_最新版
demaecan
0
32k
Featured
See All Featured
Let's Do A Bunch of Simple Stuff to Make Websites Faster
chriscoyier
508
140k
[Rails World 2023 - Day 1 Closing Keynote] - The Magic of Rails
eileencodes
38
3.1k
The browser strikes back
jonoalderson
0
1.9k
How to Grow Your eCommerce with AI & Automation
katarinadahlin
PRO
2
340
Measuring & Analyzing Core Web Vitals
bluesmoon
9
1.1k
The World Runs on Bad Software
bkeepers
PRO
72
12k
Ruling the World: When Life Gets Gamed
codingconduct
0
430
The Pragmatic Product Professional
lauravandoore
37
7.5k
Beyond borders and beyond the search box: How to win the global "messy middle" with AI-driven SEO
davidcarrasco
3
300
Neural Spatial Audio Processing for Sound Field Analysis and Control
skoyamalab
0
610
Visual Storytelling: How to be a Superhuman Communicator
reverentgeek
2
740
[Rails World 2026] Durable orchestration on Rails: from continuation to workflow
palkan
3
1.2k
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!