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
Mock
Search
joyful1227
May 08, 2020
Programming
900
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
Mock
mock & test double
joyful1227
May 08, 2020
Transcript
13 slides
Mock
什麼是 Mock? 。測試替⾝(Test Double)的⼀種。 - Dummy Object - Test Stub
- Test Spy - Fake Object - Mock Object
什麼是 Mock? 。測試替⾝(Test Double)的⼀種。 - Dummy Object - Test Stub
- Test Spy - Fake Object - Mock Object
什麼是 測試替⾝ Test double? 。可以解決測試時,會需要的複雜元件。 。降低測試時可能的影響因素。
。測試名詞介紹: - SUT : System Under Test / Software Under
Test - DOC:Depended Component 什麼是 測試替⾝ Test double?
。驗證SUT (System Under Test / Software Under Test) 確保程式邏輯正確。 。不希望DOC
(Depended Component )成為影響因素。 。減少開發過程中造成的錯誤 為什麼需要 測試替⾝ Test double?
- Dummy Object - Test Stub - Test Spy -
Fake Object - Mock Object 五種測試替⾝ Test double
- Dummy Object - Test Stub - Test Spy -
Fake Object - Mock Object 五種測試替⾝ Test double
- Dummy Object - Test Stub - Test Spy -
Fake Object - Mock Object 五種測試替⾝ Test double
- Dummy Object - Test Stub - Test Spy -
Fake Object - Mock Object 五種測試替⾝ Test double
- Dummy Object - Test Stub - Test Spy -
Fake Object - Mock Object 五種測試替⾝ Test double
Mock的好處 。開發App期間,可以完全掌控整個App對於資料的依賴性 。可以不再有網路層影響因素 。簡易的控制數據 。Mock⼀個 API對於專案中,是最⼩的變動。
參考⽂件 • https://github.com/jpcarreira/MockAPI • https://contemplator.github.io/blog/2017/06/21/Test-Double-測試替⾝/
More Decks by joyful1227
See All by joyful1227
ios13 presentations
joyful1227
0
340
Other Decks in Programming
See All in Programming
Secure Your Coding Agent Like It’s Malware (v1.5) 🇬🇧 @Code.talks 2026
richargh
0
160
SODA - FACT BOOK(EN)
sodainc
1
250
高橋メソッドでCVE解説シリーズ 〜CVE-2026-112816〜
hakkadaikon
0
260
なぜ私たちは「現時点では」KMPの導入を見送ったのか
chigichan24
1
270
Lambda durable functionsでHuman in the Loopを楽に…楽に……
har1101
2
330
TS 7.0 で baseUrl が使えなくなった今、パスエイリアスをどうするか
bicstone
2
670
Enforcing Your Architecture with Unit Tests in the AI Era (Swift Connection X)
steliosf
PRO
1
180
LLM 101
dalinaum
0
500
Engineering Biometric UX Across Android Versions | DroidKnights 2026
ryunen344
1
210
エージェントを使い続けるためのメタワーク / Meta-work for keeping using the agent
rkaga
6
2.3k
느린 네트워크와 저사양 디바이스 사용자를 위한 웹뷰 로딩 시간 개선기
kmkim
1
240
Scalaの型でマルチテナントの認可を守る
nextbeatdev
0
150
Featured
See All Featured
GraphQLの誤解/rethinking-graphql
sonatard
75
12k
How to Align SEO within the Product Triangle To Get Buy-In & Support - #RIMC
aleyda
2
1.9k
Taking LLMs out of the black box: A practical guide to human-in-the-loop distillation
inesmontani
PRO
3
2.5k
Statistics for Hackers
jakevdp
799
230k
Deep Space Network (abreviated)
tonyrice
0
420
Getting science done with accelerated Python computing platforms
jacobtomlinson
2
570
Into the Great Unknown - MozCon
thekraken
41
2.8k
Fireside Chat
paigeccino
43
4.1k
Visualization
eitanlees
153
17k
AI in Enterprises - Java and Open Source to the Rescue
ivargrimstad
0
1.6k
A brief & incomplete history of UX Design for the World Wide Web: 1989–2019
jct
2
560
Redefining SEO in the New Era of Traffic Generation
szymonslowik
1
530