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
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
90
Introduction to PHPConf.Asia 2018
miccheng
0
720
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
オフライン対応!Flutterアプリに全文検索エンジンを実装する @FlutterKaigi2025
itsmedreamwalker
2
190
レイトレZ世代に捧ぐ、今からレイトレを始めるための小径
ichi_raven
0
290
PyCon mini 東海 2025「個人ではじめるマルチAIエージェント入門 〜LangChain × LangGraphでアイデアを形にするステップ〜」
komofr
3
940
HTTPじゃ遅すぎる! SwitchBotを自作ハブで動かして学ぶBLE通信
occhi
0
240
なぜ強調表示できず ** が表示されるのか — Perlで始まったMarkdownの歴史と日本語文書における課題
kwahiro
11
5.5k
JEP 496 と JEP 497 から学ぶ耐量子計算機暗号入門 / Learning Post-Quantum Crypto Basics from JEP 496 & 497
mackey0225
2
220
DartASTとその活用
sotaatos
2
110
イベントストーミングのはじめかた / Getting Started with Event Storming
nrslib
1
380
モビリティSaaSにおけるデータ利活用の発展
nealle
0
110
Private APIの呼び出し方
kishikawakatsumi
3
860
r2-image-worker
yusukebe
1
170
ネストしたdata classの面倒な更新にさようなら!Lensを作って理解するArrowのOpticsの世界
shiita0903
1
320
Featured
See All Featured
Producing Creativity
orderedlist
PRO
348
40k
What's in a price? How to price your products and services
michaelherold
246
12k
Speed Design
sergeychernyshev
32
1.2k
The Pragmatic Product Professional
lauravandoore
36
7k
Evolution of real-time – Irina Nazarova, EuRuKo, 2024
irinanazarova
9
1k
Testing 201, or: Great Expectations
jmmastey
46
7.8k
Large-scale JavaScript Application Architecture
addyosmani
514
110k
Build your cross-platform service in a week with App Engine
jlugia
234
18k
Git: the NoSQL Database
bkeepers
PRO
432
66k
It's Worth the Effort
3n
187
28k
CoffeeScript is Beautiful & I Never Want to Write Plain JavaScript Again
sstephenson
162
15k
JavaScript: Past, Present, and Future - NDC Porto 2020
reverentgeek
52
5.7k
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