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
Sponsored
·
Ship Features Fearlessly
Turn features on and off without deploys. Used by thousands of Ruby developers.
→
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
170
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
97
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
開発者から情シスまで - 多様なユーザー層に届けるAPI提供戦略 / Postman API Night Okinawa 2026 Winter
tasshi
0
200
例外処理とどう使い分ける?Result型を使ったエラー設計 #burikaigi
kajitack
16
6k
QAフローを最適化し、品質水準を満たしながらリリースまでの期間を最短化する #RSGT2026
shibayu36
2
4.4k
CSC307 Lecture 06
javiergs
PRO
0
680
AI & Enginnering
codelynx
0
110
CSC307 Lecture 02
javiergs
PRO
1
780
「ブロックテーマでは再現できない」は本当か?
inc2734
0
960
AIエージェントのキホンから学ぶ「エージェンティックコーディング」実践入門
masahiro_nishimi
5
430
余白を設計しフロントエンド開発を 加速させる
tsukuha
7
2.1k
Fluid Templating in TYPO3 14
s2b
0
130
CSC307 Lecture 07
javiergs
PRO
0
550
Amazon Bedrockを活用したRAGの品質管理パイプライン構築
tosuri13
4
320
Featured
See All Featured
Measuring Dark Social's Impact On Conversion and Attribution
stephenakadiri
1
120
Building the Perfect Custom Keyboard
takai
2
680
Applied NLP in the Age of Generative AI
inesmontani
PRO
4
2k
How to Align SEO within the Product Triangle To Get Buy-In & Support - #RIMC
aleyda
1
1.4k
Data-driven link building: lessons from a $708K investment (BrightonSEO talk)
szymonslowik
1
910
Tips & Tricks on How to Get Your First Job In Tech
honzajavorek
0
430
How to Ace a Technical Interview
jacobian
281
24k
The untapped power of vector embeddings
frankvandijk
1
1.6k
It's Worth the Effort
3n
188
29k
Tell your own story through comics
letsgokoyo
1
810
Designing for Timeless Needs
cassininazir
0
130
Speed Design
sergeychernyshev
33
1.5k
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