$30 off During Our Annual Pro Sale. View Details »
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
120
Prioritizing Technical Debt
miccheng
0
170
JuniorDevSG - Intro to Coding Dojo
miccheng
0
150
Intro to Web Development with PHP - Lesson 1
miccheng
0
130
Engineers.SG Volunteers Training (4 Aug 2018)
miccheng
0
92
Introduction to PHPConf.Asia 2018
miccheng
0
730
What about Ruby on Rails?... from a PHP Guy
miccheng
0
150
Engineers.SG Volunteers Training (July 2017)
miccheng
0
110
Concourse CI in the Wild
miccheng
0
240
Other Decks in Programming
See All in Programming
リリース時」テストから「デイリー実行」へ!開発マネージャが取り組んだ、レガシー自動テストのモダン化戦略
goataka
0
120
認証・認可の基本を学ぼう後編
kouyuume
0
180
テストやOSS開発に役立つSetup PHP Action
matsuo_atsushi
0
150
Cap'n Webについて
yusukebe
0
120
AWS CDKの推しポイントN選
akihisaikeda
1
240
TUIライブラリつくってみた / i-just-make-TUI-library
kazto
1
360
AIコーディングエージェント(NotebookLM)
kondai24
0
170
ZOZOにおけるAI活用の現在 ~モバイルアプリ開発でのAI活用状況と事例~
zozotech
PRO
8
5.4k
[SF Ruby Conf 2025] Rails X
palkan
0
490
関数実行の裏側では何が起きているのか?
minop1205
1
680
「コードは上から下へ読むのが一番」と思った時に、思い出してほしい話
panda728
PRO
37
25k
AIエンジニアリングのご紹介 / Introduction to AI Engineering
rkaga
5
1.9k
Featured
See All Featured
Building Flexible Design Systems
yeseniaperezcruz
330
39k
How to Think Like a Performance Engineer
csswizardry
28
2.4k
CoffeeScript is Beautiful & I Never Want to Write Plain JavaScript Again
sstephenson
162
15k
Reflections from 52 weeks, 52 projects
jeffersonlam
355
21k
jQuery: Nuts, Bolts and Bling
dougneiner
65
8.2k
Optimising Largest Contentful Paint
csswizardry
37
3.5k
The World Runs on Bad Software
bkeepers
PRO
72
12k
Optimizing for Happiness
mojombo
379
70k
Building Better People: How to give real-time feedback that sticks.
wjessup
370
20k
The Hidden Cost of Media on the Web [PixelPalooza 2025]
tammyeverts
1
93
Helping Users Find Their Own Way: Creating Modern Search Experiences
danielanewman
31
3k
[Rails World 2023 - Day 1 Closing Keynote] - The Magic of Rails
eileencodes
37
2.6k
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