Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Speaker Deck
PRO
Sign in
Sign up for free
How Much Should We Test?
Michael Cheng
March 09, 2017
Programming
1
120
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
50
Prioritizing Technical Debt
miccheng
0
67
JuniorDevSG - Intro to Coding Dojo
miccheng
0
66
Intro to Web Development with PHP - Lesson 1
miccheng
0
67
Engineers.SG Volunteers Training (4 Aug 2018)
miccheng
0
54
Introduction to PHPConf.Asia 2018
miccheng
0
580
What about Ruby on Rails?... from a PHP Guy
miccheng
0
100
Engineers.SG Volunteers Training (July 2017)
miccheng
0
67
Concourse CI in the Wild
miccheng
0
100
Other Decks in Programming
See All in Programming
Modern Android Developer ~ 안내서
pluu
1
610
How we run a Realtime Puzzle Fighting Game on AWS Serverless
falken
0
250
1時間半で克服するJavaScriptの非同期処理/async_javascript_kokufuku
marchin1989
2
610
Baseline Profilesでアプリのパフォーマンスを向上させる / Improve app performance with Baseline Profiles
numeroanddev
0
230
Node.jsデザインパターンを読んで
mmmommm
0
2.5k
A Philosophy of Software Design 後半
yosuke_furukawa
PRO
10
2.7k
dotdotdot_in_predict_function
bk_18
1
180
パターンマッチングを学んで新しいJavaの世界へ!Java 18までの目玉機能をおさらいしよう / Java 18 pattern matching
ihcomega56
3
390
iOS 16からのロック画面Widget争奪戦に備える
tsuzuki817
0
210
シェーダー氷山発掘記
logilabo
0
140
Airflowはすごいぞ!
hankehly
0
370
RFC 9111: HTTP Caching
jxck
0
160
Featured
See All Featured
Responsive Adventures: Dirty Tricks From The Dark Corners of Front-End
smashingmag
237
19k
Stop Working from a Prison Cell
hatefulcrawdad
261
17k
KATA
mclloyd
7
8.7k
Bootstrapping a Software Product
garrettdimon
296
110k
Java REST API Framework Comparison - PWX 2021
mraible
PRO
11
4.7k
How to train your dragon (web standard)
notwaldorf
58
3.9k
JavaScript: Past, Present, and Future - NDC Porto 2020
reverentgeek
37
3.2k
The Brand Is Dead. Long Live the Brand.
mthomps
46
2.7k
Navigating Team Friction
lara
175
11k
Embracing the Ebb and Flow
colly
73
3.4k
GitHub's CSS Performance
jonrohan
1020
420k
Making the Leap to Tech Lead
cromwellryan
113
7.4k
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