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
Sponsored
·
SiteGround - Reliable hosting with speed, security, and support you can count on.
→
Michael Cheng
March 09, 2017
Programming
210
1
Share
How Much Should We Test?
Presented at SP Tech Talk
Michael Cheng
March 09, 2017
More Decks by Michael Cheng
See All by Michael Cheng
Intro to GraphQL Workshop
miccheng
0
150
Prioritizing Technical Debt
miccheng
0
190
JuniorDevSG - Intro to Coding Dojo
miccheng
0
180
Intro to Web Development with PHP - Lesson 1
miccheng
0
150
Engineers.SG Volunteers Training (4 Aug 2018)
miccheng
0
110
Introduction to PHPConf.Asia 2018
miccheng
0
770
What about Ruby on Rails?... from a PHP Guy
miccheng
0
160
Engineers.SG Volunteers Training (July 2017)
miccheng
0
120
Concourse CI in the Wild
miccheng
0
260
Other Decks in Programming
See All in Programming
実用!Hono RPC2026
yodaka
2
220
Coding at the Speed of Thought: The New Era of Symfony Docker
dunglas
0
5k
The Monolith Strikes Back: Why AI Agents ❤️ Rails Monoliths
serradura
0
330
PCOVから学ぶコードカバレッジ #phpcon_odawara
o0h
PRO
0
270
レガシーPHP転生 〜父がドメインエキスパートだったのでDDD+Claude Codeでチート開発します〜
panda_program
0
930
Alternatives to JPA 2026
debop
0
110
PHP で mp3 プレイヤーを実装しよう
m3m0r7
PRO
0
280
「速くなった気がする」をデータで疑う
senleaf24
0
180
JAWS-UG横浜 #100 祝・第100回スペシャルAWS は VPC レスの時代へ
maroon1st
0
140
書籍「ユーザーストーリーマッピング」が私のバイブル
asumikam
3
340
AIベース静的検査器の偽陽性率を抑える工夫3選
orgachem
PRO
3
270
ハーネスエンジニアリングとは?
kinopeee
10
5.1k
Featured
See All Featured
Ethics towards AI in product and experience design
skipperchong
2
260
Collaborative Software Design: How to facilitate domain modelling decisions
baasie
0
200
Art, The Web, and Tiny UX
lynnandtonic
304
21k
The AI Search Optimization Roadmap by Aleyda Solis
aleyda
1
5.6k
Fantastic passwords and where to find them - at NoRuKo
philnash
52
3.6k
Reflections from 52 weeks, 52 projects
jeffersonlam
356
21k
Building Applications with DynamoDB
mza
96
7k
Marketing Yourself as an Engineer | Alaka | Gurzu
gurzu
0
180
Amusing Abliteration
ianozsvald
1
150
Building Experiences: Design Systems, User Experience, and Full Site Editing
marktimemedia
0
480
Data-driven link building: lessons from a $708K investment (BrightonSEO talk)
szymonslowik
1
1k
4 Signs Your Business is Dying
shpigford
187
22k
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