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
210
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
130
Prioritizing Technical Debt
miccheng
0
180
JuniorDevSG - Intro to Coding Dojo
miccheng
0
170
Intro to Web Development with PHP - Lesson 1
miccheng
0
140
Engineers.SG Volunteers Training (4 Aug 2018)
miccheng
0
98
Introduction to PHPConf.Asia 2018
miccheng
0
760
What about Ruby on Rails?... from a PHP Guy
miccheng
0
150
Engineers.SG Volunteers Training (July 2017)
miccheng
0
120
Concourse CI in the Wild
miccheng
0
250
Other Decks in Programming
See All in Programming
オブザーバビリティ駆動開発って実際どうなの?
yohfee
2
630
Python’s True Superpower
hynek
0
190
15年目のiOSアプリを1から作り直す技術
teakun
0
570
社内規程RAGの精度を73.3% → 100%に改善した話
oharu121
12
6.1k
Ruby x Terminal
a_matsuda
5
510
AI巻き込み型コードレビューのススメ
nealle
2
2.4k
Event Storming
hschwentner
3
1.3k
JPUG勉強会 OSSデータベースの内部構造を理解しよう
oga5
2
220
Railsの気持ちを考えながらコントローラとビューを整頓する/tidying-rails-controllers-and-views-as-rails-think
moro
4
360
AI時代のソフトウェア開発でも「人が仕様を書く」から始めよう-医療IT現場での実践とこれから
koukimiura
0
110
Go1.26 go fixをプロダクトに適用して困ったこと
kurakura0916
0
310
DevinとClaude Code、SREの現場で使い倒してみた件
karia
1
790
Featured
See All Featured
GitHub's CSS Performance
jonrohan
1032
470k
Designing for humans not robots
tammielis
254
26k
Max Prin - Stacking Signals: How International SEO Comes Together (And Falls Apart)
techseoconnect
PRO
0
100
Music & Morning Musume
bryan
47
7.1k
Groundhog Day: Seeking Process in Gaming for Health
codingconduct
0
110
Understanding Cognitive Biases in Performance Measurement
bluesmoon
32
2.8k
Let's Do A Bunch of Simple Stuff to Make Websites Faster
chriscoyier
508
140k
Why Our Code Smells
bkeepers
PRO
340
58k
Building an army of robots
kneath
306
46k
How to build a perfect <img>
jonoalderson
1
5.2k
Build your cross-platform service in a week with App Engine
jlugia
234
18k
Evolution of real-time – Irina Nazarova, EuRuKo, 2024
irinanazarova
9
1.2k
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