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
220
1
Share
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
160
Prioritizing Technical Debt
miccheng
0
190
JuniorDevSG - Intro to Coding Dojo
miccheng
0
180
Intro to Web Development with PHP - Lesson 1
miccheng
0
150
Engineers.SG Volunteers Training (4 Aug 2018)
miccheng
0
110
Introduction to PHPConf.Asia 2018
miccheng
0
780
What about Ruby on Rails?... from a PHP Guy
miccheng
0
170
Engineers.SG Volunteers Training (July 2017)
miccheng
0
130
Concourse CI in the Wild
miccheng
0
270
Other Decks in Programming
See All in Programming
JavaDoc 再入門
nagise
0
240
TypeScriptだけでAIエージェントを作る フロント・エージェント・インフラのフルスタック実践
har1101
6
1.2k
RTSPクライアントを自作してみた話
simotin13
0
410
代数的データ型って何が嬉しいの? #frontend_phpcon_do
kajitack
7
3k
These Five Tricks Can Make Your Apps Greener, Cheaper, & Nicer
hollycummins
0
260
AI時代の仕事技芸論 — ソフトウェア開発で「遊ぶように働く」職人的熟達のすすめ
kuranuki
1
570
TSKaigi 2026 TypeScriptバックエンドのオブザーバビリティ戦略 — Datadog × NestJSの実践
taiseiyamamotoan
1
210
生成AI時代にこそ効くGo | Why Go Works in the Age of Generative AI
mom0tomo
8
3.1k
Oxlintはいかにしてtsgolintのlint ruleを呼び出しているのか
syumai
2
1.1k
inferと仲良くなる10分間
ryokatsuse
1
320
Lemonade + Foundry Toolkit でお手軽アプリ開発
seosoft
1
260
柔軟なPDFレイアウトエディタを支える型システム設計 — Discriminated UnionとConditional Typeの実践
minako__ph
4
1.2k
Featured
See All Featured
Evolving SEO for Evolving Search Engines
ryanjones
0
210
The Director’s Chair: Orchestrating AI for Truly Effective Learning
tmiket
1
180
Evolution of real-time – Irina Nazarova, EuRuKo, 2024
irinanazarova
9
1.4k
Between Models and Reality
mayunak
4
320
The Invisible Side of Design
smashingmag
302
52k
Visual Storytelling: How to be a Superhuman Communicator
reverentgeek
2
540
10 Git Anti Patterns You Should be Aware of
lemiorhan
PRO
659
62k
Keith and Marios Guide to Fast Websites
keithpitt
413
23k
What the history of the web can teach us about the future of AI
inesmontani
PRO
1
600
RailsConf 2023
tenderlove
30
1.5k
Unsuck your backbone
ammeep
672
58k
Testing 201, or: Great Expectations
jmmastey
46
8.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