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
230
1
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
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
170
Prioritizing Technical Debt
miccheng
0
200
JuniorDevSG - Intro to Coding Dojo
miccheng
0
190
Intro to Web Development with PHP - Lesson 1
miccheng
0
160
Engineers.SG Volunteers Training (4 Aug 2018)
miccheng
0
120
Introduction to PHPConf.Asia 2018
miccheng
0
810
What about Ruby on Rails?... from a PHP Guy
miccheng
0
170
Engineers.SG Volunteers Training (July 2017)
miccheng
0
140
Concourse CI in the Wild
miccheng
0
270
Other Decks in Programming
See All in Programming
PyO3 で既存 Python 評価器を Rust core 化する ー wasm-bindgen でブラウザにも配るための設計
kdash
1
370
이 함수, 실패하면 어떻게 되나요? null부터 Rich Errors까지, Kotlin 에러 처리 15년
haeti2
0
130
AI時代に学ぶ 好きなルール 嫌いなルール Linter編
shorty5121
0
830
信頼性の目標を誰も求めてない
shubox
0
490
GKE アップグレード前に知っておきたい Blue/Green と PDB の関係
stkk
0
140
自分的「カンファレンスの楽しみ方」
syumai
0
190
Hono + Inertia + React で LP を構築した話
oukayuka
2
210
DroidKaigi 2026 「個人開発という実験場: Android エンジニアが手にする4つの自由」
slashnephy
0
220
XHTMLが残したもの
yosuke_furukawa
PRO
1
390
業務時間外もAIに働いてもらう話
colorful12
3
9.9k
AIに既存システムを理解させる技術 ~レガシーを見捨てないハーネスエンジニアリング入門~
ochtum
0
200
PHPプロジェクトの結合バランスを可視化する #php_night
kajitack
0
210
Featured
See All Featured
Taking LLMs out of the black box: A practical guide to human-in-the-loop distillation
inesmontani
PRO
3
2.4k
State of Search Keynote: SEO is Dead Long Live SEO
ryanjones
0
260
Leading Effective Engineering Teams in the AI Era
addyosmani
9
2.5k
SEO Brein meetup: CTRL+C is not how to scale international SEO
lindahogenes
1
2.9k
Distributed Sagas: A Protocol for Coordinating Microservices
caitiem20
333
23k
Heart Work Chapter 1 - Part 1
lfama
PRO
8
36k
Accessibility Awareness
sabderemane
1
200
Tips & Tricks on How to Get Your First Job In Tech
honzajavorek
1
720
Building a Modern Day E-commerce SEO Strategy
aleyda
45
9.2k
Unsuck your backbone
ammeep
672
58k
Between Models and Reality
mayunak
4
450
Learning to Love Humans: Emotional Interface Design
aarron
275
41k
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