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
Sponsored
·
Ship Features Fearlessly
Turn features on and off without deploys. Used by thousands of Ruby developers.
→
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
CDIの誤解しがちな仕様とその対処TIPS
futokiyo
0
200
Vuetify 3 → 4 何が変わった?差分と移行ポイント10分まとめ
koukimiura
0
110
nuget-server - あなたが必要だったNuGetサーバー
kekyo
PRO
0
230
The Past, Present, and Future of Enterprise Java
ivargrimstad
0
490
Cyrius ーLinux非依存にコンテナをネイティブ実行する専用OSー
n4mlz
0
130
CSC307 Lecture 13
javiergs
PRO
0
320
AWS×クラウドネイティブソフトウェア設計 / AWS x Cloud-Native Software Design
nrslib
15
3k
Claude Code の Skill で複雑な既存仕様をすっきり整理しよう
yuichirokato
1
360
15年目のiOSアプリを1から作り直す技術
teakun
1
620
Ruby and LLM Ecosystem 2nd
koic
1
470
The Past, Present, and Future of Enterprise Java
ivargrimstad
0
120
20260228_JAWS_Beginner_Kansai
takuyay0ne
5
480
Featured
See All Featured
What’s in a name? Adding method to the madness
productmarketing
PRO
24
4k
Darren the Foodie - Storyboard
khoart
PRO
3
2.8k
How to make the Groovebox
asonas
2
2k
What's in a price? How to price your products and services
michaelherold
247
13k
Leo the Paperboy
mayatellez
4
1.5k
コードの90%をAIが書く世界で何が待っているのか / What awaits us in a world where 90% of the code is written by AI
rkaga
60
42k
職位にかかわらず全員がリーダーシップを発揮するチーム作り / Building a team where everyone can demonstrate leadership regardless of position
madoxten
61
52k
Rebuilding a faster, lazier Slack
samanthasiow
85
9.4k
Fight the Zombie Pattern Library - RWD Summit 2016
marcelosomers
234
17k
Technical Leadership for Architectural Decision Making
baasie
3
280
Un-Boring Meetings
codingconduct
0
220
Understanding Cognitive Biases in Performance Measurement
bluesmoon
32
2.8k
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-測試替⾝/