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
カンファレンスの「アレ」Webでなんとかしませんか? / Conference “thing” Why don't you do something about it on the Web?
dero1to
1
110
3 Effective Rules for Using Signals in Angular
manfredsteyer
PRO
0
100
Duckdb-Wasmでローカルダッシュボードを作ってみた
nkforwork
0
130
ペアーズにおけるAmazon Bedrockを⽤いた障害対応⽀援 ⽣成AIツールの導⼊事例 @ 20241115配信AWSウェビナー登壇
fukubaka0825
6
2k
Snowflake x dbtで作るセキュアでアジャイルなデータ基盤
tsoshiro
2
520
RubyLSPのマルチバイト文字対応
notfounds
0
120
Ethereum_.pdf
nekomatu
0
470
Flutterを言い訳にしない!アプリの使い心地改善テクニック5選🔥
kno3a87
1
200
ECS Service Connectのこれまでのアップデートと今後のRoadmapを見てみる
tkikuc
2
250
Hotwire or React? ~アフタートーク・本編に含めなかった話~ / Hotwire or React? after talk
harunatsujita
1
120
よくできたテンプレート言語として TypeScript + JSX を利用する試み / Using TypeScript + JSX outside of Web Frontend #TSKaigiKansai
izumin5210
6
1.7k
Functional Event Sourcing using Sekiban
tomohisa
0
100
Featured
See All Featured
JavaScript: Past, Present, and Future - NDC Porto 2020
reverentgeek
47
5k
The World Runs on Bad Software
bkeepers
PRO
65
11k
StorybookのUI Testing Handbookを読んだ
zakiyama
27
5.3k
For a Future-Friendly Web
brad_frost
175
9.4k
Scaling GitHub
holman
458
140k
Rebuilding a faster, lazier Slack
samanthasiow
79
8.7k
The Art of Programming - Codeland 2020
erikaheidi
52
13k
I Don’t Have Time: Getting Over the Fear to Launch Your Podcast
jcasabona
28
2k
VelocityConf: Rendering Performance Case Studies
addyosmani
325
24k
Reflections from 52 weeks, 52 projects
jeffersonlam
346
20k
The Cost Of JavaScript in 2023
addyosmani
45
6.8k
Building a Scalable Design System with Sketch
lauravandoore
459
33k
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-測試替⾝/