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
テストコードのガイドライン 〜作成から運用まで〜
riku929hr
5
660
Monixと常駐プログラムの勘どころ / Scalaわいわい勉強会 #4
stoneream
0
280
開発者とQAの越境で自動テストが増える開発プロセスを実現する
92thunder
1
190
LLM Supervised Fine-tuningの理論と実践
datanalyticslabo
7
1.3k
Cloudflare MCP ServerでClaude Desktop からWeb APIを構築
kutakutat
1
550
ゆるやかにgolangci-lintのルールを強くする / Kyoto.go #56
utgwkk
2
390
Recoilを剥がしている話
kirik
5
6.8k
競技プログラミングへのお誘い@阪大BOOSTセミナー
kotamanegi
0
360
Amazon S3 NYJavaSIG 2024-12-12
sullis
0
100
Beyond ORM
77web
7
900
これが俺の”自分戦略” プロセスを楽しんでいこう! - Developers CAREER Boost 2024
niftycorp
PRO
0
190
KubeCon + CloudNativeCon NA 2024 Overviewat Kubernetes Meetup Tokyo #68 / amsy810_k8sjp68
masayaaoyama
0
250
Featured
See All Featured
Raft: Consensus for Rubyists
vanstee
137
6.7k
Building Adaptive Systems
keathley
38
2.3k
A better future with KSS
kneath
238
17k
Product Roadmaps are Hard
iamctodd
PRO
49
11k
Facilitating Awesome Meetings
lara
50
6.1k
Documentation Writing (for coders)
carmenintech
66
4.5k
Bootstrapping a Software Product
garrettdimon
PRO
305
110k
Imperfection Machines: The Place of Print at Facebook
scottboms
266
13k
RailsConf & Balkan Ruby 2019: The Past, Present, and Future of Rails at GitHub
eileencodes
132
33k
I Don’t Have Time: Getting Over the Fear to Launch Your Podcast
jcasabona
29
2k
Templates, Plugins, & Blocks: Oh My! Creating the theme that thinks of everything
marktimemedia
28
2.1k
Git: the NoSQL Database
bkeepers
PRO
427
64k
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-測試替⾝/