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
200
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
100
Prioritizing Technical Debt
miccheng
0
150
JuniorDevSG - Intro to Coding Dojo
miccheng
0
140
Intro to Web Development with PHP - Lesson 1
miccheng
0
120
Engineers.SG Volunteers Training (4 Aug 2018)
miccheng
0
84
Introduction to PHPConf.Asia 2018
miccheng
0
700
What about Ruby on Rails?... from a PHP Guy
miccheng
0
130
Engineers.SG Volunteers Training (July 2017)
miccheng
0
91
Concourse CI in the Wild
miccheng
0
230
Other Decks in Programming
See All in Programming
High-Level Programming Languages in AI Era -Human Thought and Mind-
hayat01sh1da
PRO
0
900
Streamlitで実現できるようになったこと、実現してくれたこと
ayumu_yamaguchi
2
100
PHPUnitの限界をPlaywrightで補完するテストアプローチ
yuzneri
0
190
AI コーディングエージェントの時代へ:JetBrains が描く開発の未来
masaruhr
1
210
チームで開発し事業を加速するための"良い"設計の考え方 @ サポーターズCoLab 2025-07-08
agatan
1
480
Google Agent Development Kit でLINE Botを作ってみた
ymd65536
2
260
レトロゲームから学ぶ通信技術の歴史
kimkim0106
0
110
ペアプロ × 生成AI 現場での実践と課題について / generative-ai-in-pair-programming
codmoninc
2
22k
“いい感じ“な定量評価を求めて - Four Keysとアウトカムの間の探求 -
nealle
2
12k
Porting a visionOS App to Android XR
akkeylab
0
810
構文解析器入門
ydah
5
1.4k
副作用と戦う PHP リファクタリング ─ ドメインイベントでビジネスロジックを解きほぐす
kajitack
2
220
Featured
See All Featured
Evolution of real-time – Irina Nazarova, EuRuKo, 2024
irinanazarova
8
840
For a Future-Friendly Web
brad_frost
179
9.8k
CoffeeScript is Beautiful & I Never Want to Write Plain JavaScript Again
sstephenson
161
15k
Creating an realtime collaboration tool: Agile Flush - .NET Oxford
marcduiker
30
2.2k
Learning to Love Humans: Emotional Interface Design
aarron
273
40k
Scaling GitHub
holman
460
140k
Testing 201, or: Great Expectations
jmmastey
43
7.6k
Keith and Marios Guide to Fast Websites
keithpitt
411
22k
Being A Developer After 40
akosma
90
590k
[RailsConf 2023 Opening Keynote] The Magic of Rails
eileencodes
29
9.6k
Principles of Awesome APIs and How to Build Them.
keavy
126
17k
The Illustrated Children's Guide to Kubernetes
chrisshort
48
50k
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