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
How Much Should We Test?
Search
Michael Cheng
March 09, 2017
Programming
1
170
How Much Should We Test?
Presented at SP Tech Talk
Michael Cheng
March 09, 2017
Tweet
Share
More Decks by Michael Cheng
See All by Michael Cheng
Intro to GraphQL Workshop
miccheng
0
91
Prioritizing Technical Debt
miccheng
0
140
JuniorDevSG - Intro to Coding Dojo
miccheng
0
130
Intro to Web Development with PHP - Lesson 1
miccheng
0
110
Engineers.SG Volunteers Training (4 Aug 2018)
miccheng
0
80
Introduction to PHPConf.Asia 2018
miccheng
0
690
What about Ruby on Rails?... from a PHP Guy
miccheng
0
120
Engineers.SG Volunteers Training (July 2017)
miccheng
0
85
Concourse CI in the Wild
miccheng
0
210
Other Decks in Programming
See All in Programming
エンジニアに許された特別な時間の終わり
watany
85
73k
CIBMTR振り返り+敗北から学ぶコンペの取り組み方反省
takanao
1
430
変化の激しい時代における、こだわりのないエンジニアの強さ
satoshi256kbyte
1
1.1k
Duke on CRaC with Jakarta EE
ivargrimstad
0
980
運用しながらリアーキテクチャ
nealle
0
320
生産性アップのためのAI個人活用
kunoyasu
0
450
DevNexus - Create AI Infused Java Apps with LangChain4j
kdubois
0
170
高セキュリティ・高耐障害性・サブシステム化。そして2億円
tasukulab280
2
510
⚪⚪の⚪⚪をSwiftUIで再現す る
u503
0
160
なぜselectはselectではないのか
taiyow
2
170
Gunma.web #55
tinykitten
0
110
読もう! Android build ドキュメント
andpad
1
190
Featured
See All Featured
Scaling GitHub
holman
459
140k
The Pragmatic Product Professional
lauravandoore
32
6.5k
Easily Structure & Communicate Ideas using Wireframe
afnizarnur
194
16k
GitHub's CSS Performance
jonrohan
1030
460k
Intergalactic Javascript Robots from Outer Space
tanoku
270
27k
VelocityConf: Rendering Performance Case Studies
addyosmani
328
24k
Done Done
chrislema
182
16k
How to Think Like a Performance Engineer
csswizardry
22
1.4k
Sharpening the Axe: The Primacy of Toolmaking
bcantrill
40
2k
Fight the Zombie Pattern Library - RWD Summit 2016
marcelosomers
233
17k
Practical Tips for Bootstrapping Information Extraction Pipelines
honnibal
PRO
14
1k
実際に使うSQLの書き方 徹底解説 / pgcon21j-tutorial
soudai
176
52k
Transcript
HOW MUCH SHOULD WE TEST? Or how to stop hating
your tests
GOALS OF TEST SUITE • Tests should be thorough •
Tests should be stable • Tests should be fast • Tests should be few (minimal)
TEST DRIVEN DEVELOPMENT • We use test cases to guide
the design of our code • 2 approaches to testing - Inside Out and Outside In • Outside In - Use integration tests to guide you • Inside Out - Build & test individual components, integrate later
None
None
Object under test
Object under test Incoming Messages
Object under test Incoming Messages Outgoing Messages
Object under test Incoming Messages Outgoing Messages
Object under test Incoming Messages Outgoing Messages Send to self
Object under test Incoming Messages Outgoing Messages Send to self
Message Types:
Object under test Incoming Messages Outgoing Messages Send to self
Query Message Types:
Object under test Incoming Messages Outgoing Messages Send to self
Command Query Message Types:
MESSAGE TYPES • Query: Returns something / changes nothing •
Command: Returns nothing / changes something Object under test Incoming Messages Outgoing Messages Send to self Command Query
None
None
None
None
None
None
RESOURCES • “The Magic Tricks of Testing” - Sandi Metz
http://confreaks.tv/videos/railsconf2013- the-magic-tricks-of-testing • “Working Effectively with Unit Tests” - Jay Fields https://leanpub.com/wewut