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
Sponsored
·
SiteGround - Reliable hosting with speed, security, and support you can count on.
→
joyful1227
May 08, 2020
Programming
890
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
Mock
mock & test double
joyful1227
May 08, 2020
More Decks by joyful1227
See All by joyful1227
ios13 presentations
joyful1227
0
330
Other Decks in Programming
See All in Programming
KiroのSpecで「五目並べ」を作ってみる
satoshi256kbyte
1
320
設計次第でAIコードの読む量は減らせる / designing-for-code-reading
minodriven
30
13k
難しいけど、読めた。- OSSの入口に立った話。
sts11142
0
130
setup-vp GitLab対応の裏側
naokihaba
0
140
FreeBSDでZabbixを動かす
kenkino
0
340
JRuby: Past, Present, and Future
headius
0
210
速習iPhone Duo対応
yuukiw00w
2
910
iOSDC Japan 2026 - Swiftで作って学ぼう!データベース自作入門
kaseken
2
410
仕様駆動開発による爆速プロダクト開発 / Bakusoku Spec Driven Development
kobakei
0
150
すこし踏み込む CancellationToken
htkym
2
1.5k
Ghostty + Neovimで作る 透明でカッコ良い開発環境
j341nono
0
150
カツオ、ご期待ください
suneo3476
0
120
Featured
See All Featured
Information Architects: The Missing Link in Design Systems
soysaucechin
1
1.2k
Designing for humans not robots
tammielis
254
26k
Leadership Guide Workshop - DevTernity 2021
reverentgeek
1
380
The #1 spot is gone: here's how to win anyway
tamaranovitovic
4
1.2k
svc-hook: hooking system calls on ARM64 by binary rewriting
retrage
2
600
GraphQLとの向き合い方2022年版
quramy
50
15k
Heart Work Chapter 1 - Part 1
lfama
PRO
10
36k
Google's AI Overviews - The New Search
badams
0
1.6k
How to Think Like a Performance Engineer
csswizardry
28
2.8k
Bootstrapping a Software Product
garrettdimon
PRO
306
120k
Claude Code のすすめ
schroneko
67
230k
CoffeeScript is Beautiful & I Never Want to Write Plain JavaScript Again
sstephenson
162
16k
Transcript
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-測試替⾝/