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
190
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
監視 やばい
syossan27
11
10k
Compose Hot Reload is here, stop re-launching your apps! (Android Makers 2025)
zsmb
1
550
The Evolution of the CRuby Build System
kateinoigakukun
0
720
KawaiiLT 登壇資料 キャリアとモチベーション
hiiragi
0
140
REALITY コマンド作成チュートリアル
nishiuriraku
0
110
生成AIを使ったQAアプリケーションの作成 - ハンズオン補足資料
oracle4engineer
PRO
3
250
Building Scalable Mobile Projects: Fast Builds, High Reusability and Clear Ownership
cyrilmottier
2
310
AIコーディングの理想と現実
tomohisa
30
34k
Unlock the Potential of Swift Code Generation
rockname
0
270
七輪ライブラリー: Claude AI で作る Next.js アプリ
suneo3476
1
120
AHC045_解説
shun_pi
0
560
Lambda(Python)の リファクタリングが好きなんです
komakichi
3
220
Featured
See All Featured
No one is an island. Learnings from fostering a developers community.
thoeni
21
3.2k
Intergalactic Javascript Robots from Outer Space
tanoku
270
27k
Making Projects Easy
brettharned
116
6.1k
Writing Fast Ruby
sferik
628
61k
Java REST API Framework Comparison - PWX 2021
mraible
30
8.5k
Building Applications with DynamoDB
mza
94
6.3k
Exploring the Power of Turbo Streams & Action Cable | RailsConf2023
kevinliebholz
32
5.4k
Keith and Marios Guide to Fast Websites
keithpitt
411
22k
The Psychology of Web Performance [Beyond Tellerrand 2023]
tammyeverts
47
2.7k
The Straight Up "How To Draw Better" Workshop
denniskardys
232
140k
The Art of Programming - Codeland 2020
erikaheidi
53
13k
Fontdeck: Realign not Redesign
paulrobertlloyd
83
5.5k
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