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
170
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
82
Prioritizing Technical Debt
miccheng
0
120
JuniorDevSG - Intro to Coding Dojo
miccheng
0
110
Intro to Web Development with PHP - Lesson 1
miccheng
0
100
Engineers.SG Volunteers Training (4 Aug 2018)
miccheng
0
73
Introduction to PHPConf.Asia 2018
miccheng
0
650
What about Ruby on Rails?... from a PHP Guy
miccheng
0
120
Engineers.SG Volunteers Training (July 2017)
miccheng
0
78
Concourse CI in the Wild
miccheng
0
180
Other Decks in Programming
See All in Programming
Introduction to GitOps
hwchiu
0
110
はしめてのプログラミングとロボット制御
watawatavoltage
0
290
Jetpack for KMP
fornewid
1
290
CSC307 Lecture 12
javiergs
PRO
0
220
なぜ宣言的 UI は壊れにくいのか / Why declarative UI is less fragile
uenitty
29
13k
「2024年版 Kotlin サーバーサイドプログラミング実践開発」の補講 〜O/Rマッパー編〜
n_takehata
2
260
GraphQL はいいぞ! ~Laravel で学ぶ GraphQL 入門~
azuki
1
160
Folding Cheat Sheet #7
philipschwarz
PRO
0
150
From Spring Boot 2 to Spring Boot 3 with Java 22 and Jakarta EE
ivargrimstad
0
1.9k
Rubyのパフォーマンスプロファイリングの改善 / Enhancing performance profiling for Ruby
osyoyu
1
410
DMMプラットフォームにおけるTiDBの導入から運用まで
pospome
7
3k
継続的な活動で築く地方エンジニアの道
myamashii
2
350
Featured
See All Featured
Bootstrapping a Software Product
garrettdimon
PRO
304
110k
CSS Pre-Processors: Stylus, Less & Sass
bermonpainter
353
29k
Automating Front-end Workflow
addyosmani
1362
200k
Java REST API Framework Comparison - PWX 2021
mraible
PRO
20
7.2k
実際に使うSQLの書き方 徹底解説 / pgcon21j-tutorial
soudai
149
45k
Six Lessons from altMBA
skipperchong
24
3.2k
Keith and Marios Guide to Fast Websites
keithpitt
408
22k
Into the Great Unknown - MozCon
thekraken
20
1.3k
Visualization
eitanlees
139
14k
How STYLIGHT went responsive
nonsquared
93
5k
How GitHub Uses GitHub to Build GitHub
holman
471
290k
Faster Mobile Websites
deanohume
303
30k
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