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
Mock
Search
joyful1227
May 08, 2020
Programming
0
880
Mock
mock & test double
joyful1227
May 08, 2020
Tweet
Share
More Decks by joyful1227
See All by joyful1227
ios13 presentations
joyful1227
0
320
Other Decks in Programming
See All in Programming
Go 1.26でのsliceのメモリアロケーション最適化 / Go 1.26 リリースパーティ #go126party
mazrean
1
370
AIコーディングの理想と現実 2026 | AI Coding: Expectations vs. Reality 2026
tomohisa
0
1.2k
Agent Skills Workshop - AIへの頼み方を仕組み化する
gotalab555
15
8.4k
Unity6.3 AudioUpdate
cova8bitdots
0
120
How to stabilize UI tests using XCTest
akkeylab
0
110
CDIの誤解しがちな仕様とその対処TIPS
futokiyo
0
200
手戻りゼロ? Spec Driven Developmentとは@KAG AI week
tmhirai
1
190
ポーリング処理廃止によるイベント駆動アーキテクチャへの移行
seitarof
1
450
Docコメントで始める簡単ガードレール
keisukeikeda
1
110
Fundamentals of Software Engineering In the Age of AI
therealdanvega
1
240
AI駆動開発の本音 〜Claude Code並列開発で見えたエンジニアの新しい役割〜
hisuzuya
4
500
AI活用のコスパを最大化する方法
ochtum
0
130
Featured
See All Featured
Impact Scores and Hybrid Strategies: The future of link building
tamaranovitovic
0
230
GraphQLとの向き合い方2022年版
quramy
50
14k
From Legacy to Launchpad: Building Startup-Ready Communities
dugsong
0
170
Introduction to Domain-Driven Design and Collaborative software design
baasie
1
630
Test your architecture with Archunit
thirion
1
2.2k
GraphQLの誤解/rethinking-graphql
sonatard
75
11k
Future Trends and Review - Lecture 12 - Web Technologies (1019888BNR)
signer
PRO
0
3.3k
Thoughts on Productivity
jonyablonski
75
5.1k
The Spectacular Lies of Maps
axbom
PRO
1
610
The Illustrated Children's Guide to Kubernetes
chrisshort
51
52k
Done Done
chrislema
186
16k
Exploring the Power of Turbo Streams & Action Cable | RailsConf2023
kevinliebholz
37
6.3k
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-測試替⾝/