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
210
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
130
Prioritizing Technical Debt
miccheng
0
180
JuniorDevSG - Intro to Coding Dojo
miccheng
0
170
Intro to Web Development with PHP - Lesson 1
miccheng
0
140
Engineers.SG Volunteers Training (4 Aug 2018)
miccheng
0
98
Introduction to PHPConf.Asia 2018
miccheng
0
760
What about Ruby on Rails?... from a PHP Guy
miccheng
0
150
Engineers.SG Volunteers Training (July 2017)
miccheng
0
120
Concourse CI in the Wild
miccheng
0
250
Other Decks in Programming
See All in Programming
AIコーディングの理想と現実 2026 | AI Coding: Expectations vs. Reality 2026
tomohisa
0
790
Go 1.26でのsliceのメモリアロケーション最適化 / Go 1.26 リリースパーティ #go126party
mazrean
1
310
Head of Engineeringが現場で回した生産性向上施策 2025→2026
gessy0129
0
200
あなたはユーザーではない #PdENight
kajitack
4
290
Ruby x Terminal
a_matsuda
5
510
メタプログラミングで実現する「コードを仕様にする」仕組み/nikkei-tech-talk43
nikkei_engineer_recruiting
0
130
Rubyと楽しいをつくる / Creating joy with Ruby
chobishiba
0
200
CDIの誤解しがちな仕様とその対処TIPS
futokiyo
0
140
The Ralph Wiggum Loop: First Principles of Autonomous Development
sembayui
0
3.7k
AI主導でFastAPIのWebサービスを作るときに 人間が構造化すべき境界線
okajun35
0
420
AIに仕事を丸投げしたら、本当に楽になれるのか
dip_tech
PRO
0
170
Oxlint JS plugins
kazupon
1
1.1k
Featured
See All Featured
SEO in 2025: How to Prepare for the Future of Search
ipullrank
3
3.3k
Public Speaking Without Barfing On Your Shoes - THAT 2023
reverentgeek
1
330
What does AI have to do with Human Rights?
axbom
PRO
0
2k
Leadership Guide Workshop - DevTernity 2021
reverentgeek
1
220
Accessibility Awareness
sabderemane
0
71
Designing Experiences People Love
moore
144
24k
Art, The Web, and Tiny UX
lynnandtonic
304
21k
Writing Fast Ruby
sferik
630
62k
Joys of Absence: A Defence of Solitary Play
codingconduct
1
300
brightonSEO & MeasureFest 2025 - Christian Goodrich - Winning strategies for Black Friday CRO & PPC
cargoodrich
3
110
Designing for Performance
lara
611
70k
Documentation Writing (for coders)
carmenintech
77
5.3k
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