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
180
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
94
Prioritizing Technical Debt
miccheng
0
140
JuniorDevSG - Intro to Coding Dojo
miccheng
0
130
Intro to Web Development with PHP - Lesson 1
miccheng
0
110
Engineers.SG Volunteers Training (4 Aug 2018)
miccheng
0
81
Introduction to PHPConf.Asia 2018
miccheng
0
690
What about Ruby on Rails?... from a PHP Guy
miccheng
0
130
Engineers.SG Volunteers Training (July 2017)
miccheng
0
85
Concourse CI in the Wild
miccheng
0
220
Other Decks in Programming
See All in Programming
AI Agents with JavaScript
slobodan
0
220
サービスレベルを管理してアジャイルを加速しよう!! / slm-accelerate-agility
tomoyakitaura
1
170
いまさら聞けない生成AI入門: 「生成AIを高速キャッチアップ」
soh9834
15
4.5k
5年間継続して開発した自作OSSの記録
bebeji_nappa
0
170
タイムゾーンの奥地は思ったよりも闇深いかもしれない
suguruooki
1
570
リストビュー画面UX改善の振り返り
splcywolf
0
130
Develop Faster With FrankenPHP
dunglas
2
3.2k
Building a macOS screen saver with Kotlin (Android Makers 2025)
zsmb
1
140
新しいPHP拡張モジュールインストール方法「PHP Installer for Extensions (PIE)」を使ってみよう!
cocoeyes02
0
340
趣味全開のAITuber開発
kokushin
0
190
スモールスタートで始めるためのLambda×モノリス
akihisaikeda
2
180
CRE Meetup!ユーザー信頼性を支えるエンジニアリング実践例の発表資料です
tmnb
0
630
Featured
See All Featured
Rebuilding a faster, lazier Slack
samanthasiow
80
8.9k
Thoughts on Productivity
jonyablonski
69
4.6k
Bash Introduction
62gerente
611
210k
Building a Modern Day E-commerce SEO Strategy
aleyda
40
7.2k
XXLCSS - How to scale CSS and keep your sanity
sugarenia
248
1.3M
4 Signs Your Business is Dying
shpigford
183
22k
Understanding Cognitive Biases in Performance Measurement
bluesmoon
29
1.6k
Put a Button on it: Removing Barriers to Going Fast.
kastner
60
3.8k
KATA
mclloyd
29
14k
What's in a price? How to price your products and services
michaelherold
245
12k
The World Runs on Bad Software
bkeepers
PRO
67
11k
Rails Girls Zürich Keynote
gr2m
94
13k
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