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
Vueのバリデーション、結局どれを選べばいい? ― 自作バリデーションの限界と、脱却までの道のり ― / Which Vue Validation Library Should We Really Use? The Limits of Self-Made Validation and How I Finally Moved On
neginasu
1
120
コードとあなたと私の距離 / The Distance Between Code, You, and I
hiro_y
0
190
CSC305 Lecture 10
javiergs
PRO
0
220
その面倒な作業、「Dart」にやらせませんか? Flutter開発者のための業務効率化
yordgenome03
1
140
ソフトウェア設計の実践的な考え方
masuda220
PRO
4
630
Things You Thought You Didn’t Need To Care About That Have a Big Impact On Your Job
hollycummins
0
250
技術的負債の正体を知って向き合う
irof
0
230
All About Angular's New Signal Forms
manfredsteyer
PRO
0
200
スキーマ駆動で、Zod OpenAPI Honoによる、API開発するために、Hono Takibiというライブラリを作っている
nakita628
0
300
CSC305 Lecture 06
javiergs
PRO
0
270
Server Side Kotlin Meetup vol.16: 内部動作を理解して ハイパフォーマンスなサーバサイド Kotlin アプリケーションを書こう
ternbusty
3
230
What Spring Developers Should Know About Jakarta EE
ivargrimstad
0
400
Featured
See All Featured
Making Projects Easy
brettharned
120
6.4k
Save Time (by Creating Custom Rails Generators)
garrettdimon
PRO
32
1.7k
The World Runs on Bad Software
bkeepers
PRO
72
11k
Connecting the Dots Between Site Speed, User Experience & Your Business [WebExpo 2025]
tammyeverts
10
610
Designing Experiences People Love
moore
142
24k
Side Projects
sachag
455
43k
A better future with KSS
kneath
239
18k
Evolution of real-time – Irina Nazarova, EuRuKo, 2024
irinanazarova
9
990
4 Signs Your Business is Dying
shpigford
185
22k
The MySQL Ecosystem @ GitHub 2015
samlambert
251
13k
The Illustrated Children's Guide to Kubernetes
chrisshort
49
51k
Balancing Empowerment & Direction
lara
5
700
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