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
170
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
89
Prioritizing Technical Debt
miccheng
0
130
JuniorDevSG - Intro to Coding Dojo
miccheng
0
120
Intro to Web Development with PHP - Lesson 1
miccheng
0
110
Engineers.SG Volunteers Training (4 Aug 2018)
miccheng
0
78
Introduction to PHPConf.Asia 2018
miccheng
0
680
What about Ruby on Rails?... from a PHP Guy
miccheng
0
120
Engineers.SG Volunteers Training (July 2017)
miccheng
0
84
Concourse CI in the Wild
miccheng
0
210
Other Decks in Programming
See All in Programming
color-scheme: light dark; を完全に理解する
uhyo
5
400
コミュニティ駆動 AWS CDK ライブラリ「Open Constructs Library」 / community-cdk-library
gotok365
2
140
ファインディの テックブログ爆誕までの軌跡
starfish719
2
1.1k
PHPのバージョンアップ時にも役立ったAST
matsuo_atsushi
0
120
Djangoアプリケーション 運用のリアル 〜問題発生から可視化、最適化への道〜 #pyconshizu
kashewnuts
1
250
富山発の個人開発サービスで日本中の学校の業務を改善した話
krpk1900
5
390
法律の脱レガシーに学ぶフロントエンド刷新
oguemon
5
740
CDK開発におけるコーディング規約の運用
yamanashi_ren01
2
140
DROBEの生成AI活用事例 with AWS
ippey
0
130
ソフトウェアエンジニアの成長
masuda220
PRO
12
1.8k
Bedrock Agentsレスポンス解析によるAgentのOps
licux
3
850
チームリードになって変わったこと
isaka1022
0
200
Featured
See All Featured
The MySQL Ecosystem @ GitHub 2015
samlambert
250
12k
How to Ace a Technical Interview
jacobian
276
23k
Done Done
chrislema
182
16k
Git: the NoSQL Database
bkeepers
PRO
427
64k
How to Think Like a Performance Engineer
csswizardry
22
1.3k
How To Stay Up To Date on Web Technology
chriscoyier
790
250k
CSS Pre-Processors: Stylus, Less & Sass
bermonpainter
356
29k
Dealing with People You Can't Stand - Big Design 2015
cassininazir
366
25k
Reflections from 52 weeks, 52 projects
jeffersonlam
348
20k
Why Our Code Smells
bkeepers
PRO
336
57k
Unsuck your backbone
ammeep
669
57k
Building a Modern Day E-commerce SEO Strategy
aleyda
38
7.1k
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