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
87
Prioritizing Technical Debt
miccheng
0
120
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
76
Introduction to PHPConf.Asia 2018
miccheng
0
670
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
200
Other Decks in Programming
See All in Programming
受け取る人から提供する人になるということ
little_rubyist
0
230
聞き手から登壇者へ: RubyKaigi2024 LTでの初挑戦が 教えてくれた、可能性の星
mikik0
1
130
タクシーアプリ『GO』のリアルタイムデータ分析基盤における機械学習サービスの活用
mot_techtalk
4
1.4k
CSC509 Lecture 11
javiergs
PRO
0
180
イベント駆動で成長して委員会
happymana
1
320
GitHub Actionsのキャッシュと手を挙げることの大切さとそれに必要なこと
satoshi256kbyte
5
430
EventSourcingの理想と現実
wenas
6
2.3k
LLM生成文章の精度評価自動化とプロンプトチューニングの効率化について
layerx
PRO
2
190
Jakarta EE meets AI
ivargrimstad
0
520
ActiveSupport::Notifications supporting instrumentation of Rails apps with OpenTelemetry
ymtdzzz
1
230
Generative AI Use Cases JP (略称:GenU)奮闘記
hideg
1
290
OSSで起業してもうすぐ10年 / Open Source Conference 2024 Shimane
furukawayasuto
0
100
Featured
See All Featured
Why Our Code Smells
bkeepers
PRO
334
57k
Designing for humans not robots
tammielis
250
25k
Statistics for Hackers
jakevdp
796
220k
Happy Clients
brianwarren
98
6.7k
The Success of Rails: Ensuring Growth for the Next 100 Years
eileencodes
44
6.8k
Documentation Writing (for coders)
carmenintech
65
4.4k
Building Better People: How to give real-time feedback that sticks.
wjessup
364
19k
For a Future-Friendly Web
brad_frost
175
9.4k
[RailsConf 2023] Rails as a piece of cake
palkan
52
4.9k
Music & Morning Musume
bryan
46
6.2k
jQuery: Nuts, Bolts and Bling
dougneiner
61
7.5k
Why You Should Never Use an ORM
jnunemaker
PRO
54
9.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