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
110
Prioritizing Technical Debt
miccheng
0
160
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
86
Introduction to PHPConf.Asia 2018
miccheng
0
710
What about Ruby on Rails?... from a PHP Guy
miccheng
0
140
Engineers.SG Volunteers Training (July 2017)
miccheng
0
100
Concourse CI in the Wild
miccheng
0
230
Other Decks in Programming
See All in Programming
The Past, Present, and Future of Enterprise Java
ivargrimstad
0
350
bootcamp2025_バックエンド研修_WebAPIサーバ作成.pdf
geniee_inc
0
110
はじめてのDSPy - 言語モデルを『プロンプト』ではなく『プログラミング』するための仕組み
masahiro_nishimi
2
360
デミカツ切り抜きで面倒くさいことはPythonにやらせよう
aokswork3
0
230
CSC509 Lecture 03
javiergs
PRO
0
340
Web Components で実現する Hotwire とフロントエンドフレームワークの橋渡し / Bridging with Web Components
da1chi
3
2.4k
ソフトウェア設計の実践的な考え方
masuda220
PRO
4
580
AI Coding Meetup #3 - 導入セッション / ai-coding-meetup-3
izumin5210
0
3.3k
Swift Concurrency - 状態監視の罠
objectiveaudio
2
520
『毎日の移動』を支えるGoバックエンド内製開発
yutautsugi
2
250
Cloudflare AgentsとAI SDKでAIエージェントを作ってみた
briete
0
140
dynamic!
moro
10
7.9k
Featured
See All Featured
What's in a price? How to price your products and services
michaelherold
246
12k
Visualization
eitanlees
149
16k
Bootstrapping a Software Product
garrettdimon
PRO
307
110k
Faster Mobile Websites
deanohume
310
31k
Building Flexible Design Systems
yeseniaperezcruz
329
39k
Reflections from 52 weeks, 52 projects
jeffersonlam
352
21k
個人開発の失敗を避けるイケてる考え方 / tips for indie hackers
panda_program
115
20k
For a Future-Friendly Web
brad_frost
180
9.9k
Performance Is Good for Brains [We Love Speed 2024]
tammyeverts
12
1.2k
The Pragmatic Product Professional
lauravandoore
36
6.9k
KATA
mclloyd
32
15k
Let's Do A Bunch of Simple Stuff to Make Websites Faster
chriscoyier
507
140k
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