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
860
Mock
mock & test double
joyful1227
May 08, 2020
Tweet
Share
More Decks by joyful1227
See All by joyful1227
ios13 presentations
joyful1227
0
290
Other Decks in Programming
See All in Programming
「とりあえず動く」コードはよい、「読みやすい」コードはもっとよい / Code that 'just works' is good, but code that is 'readable' is even better.
mkmk884
6
1.4k
Запуск 1С:УХ в крупном энтерпрайзе: мечта и реальность ПМа
lamodatech
0
940
為你自己學 Python
eddie
0
520
ドメインイベント増えすぎ問題
h0r15h0
2
560
技術的負債と向き合うカイゼン活動を1年続けて分かった "持続可能" なプロダクト開発
yuichiro_serita
0
300
快速入門可觀測性
blueswen
0
500
週次リリースを実現するための グローバルアプリ開発
tera_ny
1
1.2k
見えないメモリを観測する: PHP 8.4 `pg_result_memory_size()` とSQL結果のメモリ管理
kentaroutakeda
0
930
Flatt Security XSS Challenge 解答・解説
flatt_security
0
730
Androidアプリのモジュール分割における:x:commonを考える
okuzawats
1
280
PSR-15 はあなたのための ものではない? - phpcon2024
myamagishi
0
400
ErdMap: Thinking about a map for Rails applications
makicamel
1
610
Featured
See All Featured
Product Roadmaps are Hard
iamctodd
PRO
50
11k
XXLCSS - How to scale CSS and keep your sanity
sugarenia
248
1.3M
Chrome DevTools: State of the Union 2024 - Debugging React & Beyond
addyosmani
3
240
For a Future-Friendly Web
brad_frost
176
9.5k
How to train your dragon (web standard)
notwaldorf
89
5.8k
Building a Modern Day E-commerce SEO Strategy
aleyda
38
7k
Producing Creativity
orderedlist
PRO
343
39k
How To Stay Up To Date on Web Technology
chriscoyier
790
250k
The World Runs on Bad Software
bkeepers
PRO
66
11k
Building an army of robots
kneath
302
45k
VelocityConf: Rendering Performance Case Studies
addyosmani
327
24k
Being A Developer After 40
akosma
89
590k
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-測試替⾝/