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
77
Prioritizing Technical Debt
miccheng
0
110
JuniorDevSG - Intro to Coding Dojo
miccheng
0
110
Intro to Web Development with PHP - Lesson 1
miccheng
0
98
Engineers.SG Volunteers Training (4 Aug 2018)
miccheng
0
73
Introduction to PHPConf.Asia 2018
miccheng
0
640
What about Ruby on Rails?... from a PHP Guy
miccheng
0
110
Engineers.SG Volunteers Training (July 2017)
miccheng
0
75
Concourse CI in the Wild
miccheng
0
160
Other Decks in Programming
See All in Programming
try! Swift Tokyo 初参加報告LT
hinakko2
0
220
Ruby GitHub Packages
bkuhlmann
0
630
try! Swift Tokyo 2024 参加報告 / try! Swift Tokyo 2024 Report
hironytic
0
210
ADRを一年運用してみた/adr_after_a_year
hanhan1978
7
2.4k
Hanami and htmx
bkuhlmann
0
210
Milestoner
bkuhlmann
1
410
Goのmultiple errorsについて (2024年4月版)
syumai
4
930
TCAとKMPを用いた新規動画配信アプリ 「ABEMA Live」の設計
tomu28
1
110
Prepare for Jakarta EE 11 - Performance and Developer Productivity
ivargrimstad
0
820
MicrosoftのPlatform Engineeringガイドを読んで実際になにかやってみた
ymd65536
1
340
Kotlin Multiplatform at Stable and Beyond (Android Makers 2024)
zsmb
0
290
1BRC--Nerd Sniping the Java Community
gunnarmorling
0
340
Featured
See All Featured
Web Components: a chance to create the future
zenorocha
305
41k
Pencils Down: Stop Designing & Start Developing
hursman
117
11k
Why Our Code Smells
bkeepers
PRO
331
56k
How to Ace a Technical Interview
jacobian
272
22k
Teambox: Starting and Learning
jrom
128
8.4k
Easily Structure & Communicate Ideas using Wireframe
afnizarnur
187
16k
Dealing with People You Can't Stand - Big Design 2015
cassininazir
357
22k
Intergalactic Javascript Robots from Outer Space
tanoku
266
26k
Building a Scalable Design System with Sketch
lauravandoore
456
32k
GitHub's CSS Performance
jonrohan
1025
450k
Responsive Adventures: Dirty Tricks From The Dark Corners of Front-End
smashingmag
244
20k
Testing 201, or: Great Expectations
jmmastey
28
6.4k
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