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
220
1
Share
How Much Should We Test?
Presented at SP Tech Talk
Michael Cheng
March 09, 2017
More Decks by Michael Cheng
See All by Michael Cheng
Intro to GraphQL Workshop
miccheng
0
150
Prioritizing Technical Debt
miccheng
0
190
JuniorDevSG - Intro to Coding Dojo
miccheng
0
180
Intro to Web Development with PHP - Lesson 1
miccheng
0
150
Engineers.SG Volunteers Training (4 Aug 2018)
miccheng
0
110
Introduction to PHPConf.Asia 2018
miccheng
0
780
What about Ruby on Rails?... from a PHP Guy
miccheng
0
160
Engineers.SG Volunteers Training (July 2017)
miccheng
0
120
Concourse CI in the Wild
miccheng
0
270
Other Decks in Programming
See All in Programming
開発とはなにか、Essenceカーネルで見えるもの
ukin0k0
0
140
GoogleCloudとterraform完全に理解した
terisuke
1
190
Road to RubyKaigi: Play Hard(ware)
makicamel
1
570
20260514 - build with ai 2026 - build LINE Bot with Gemini CLI
line_developers_tw
PRO
0
410
AI Agent と正しく分析するための環境作り
yoshyum
2
420
Making the RBS Parser Faster
soutaro
0
710
実用!Hono RPC2026
yodaka
2
310
Firefoxにコントリビューションして得られた学び
ken7253
2
160
AI-DLC Deep Dive
yuukiyo
9
5.8k
tRPCの概要と少しだけパフォーマンス
misoton665
2
270
実践ハーネスエンジニアリング:ステアリングループを実例から読み解く / Practical Harness Engineering: Understanding Steering Loops Through Real-World Examples
nrslib
5
5.2k
AIと共に生きる技術選定 2026
sgash708
0
140
Featured
See All Featured
Optimising Largest Contentful Paint
csswizardry
37
3.7k
Color Theory Basics | Prateek | Gurzu
gurzu
0
310
Claude Code どこまでも/ Claude Code Everywhere
nwiizo
65
55k
GraphQLの誤解/rethinking-graphql
sonatard
75
12k
Git: the NoSQL Database
bkeepers
PRO
432
67k
A designer walks into a library…
pauljervisheath
211
24k
Product Roadmaps are Hard
iamctodd
PRO
55
12k
JavaScript: Past, Present, and Future - NDC Porto 2020
reverentgeek
52
5.9k
Collaborative Software Design: How to facilitate domain modelling decisions
baasie
1
210
Leveraging LLMs for student feedback in introductory data science courses - posit::conf(2025)
minecr
1
250
DevOps and Value Stream Thinking: Enabling flow, efficiency and business value
helenjbeal
1
190
Winning Ecommerce Organic Search in an AI Era - #searchnstuff2025
aleyda
1
2k
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