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
200
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
95
Prioritizing Technical Debt
miccheng
0
150
JuniorDevSG - Intro to Coding Dojo
miccheng
0
130
Intro to Web Development with PHP - Lesson 1
miccheng
0
120
Engineers.SG Volunteers Training (4 Aug 2018)
miccheng
0
82
Introduction to PHPConf.Asia 2018
miccheng
0
690
What about Ruby on Rails?... from a PHP Guy
miccheng
0
130
Engineers.SG Volunteers Training (July 2017)
miccheng
0
87
Concourse CI in the Wild
miccheng
0
220
Other Decks in Programming
See All in Programming
❄️ tmux-nixの実装を通して学ぶNixOSモジュール
momeemt
1
120
がんばりすぎないコーディングルール運用術
tsukakei
1
190
Cloudflare Realtime と Workers でつくるサーバーレス WebRTC
nekoya3
0
240
💎 My RubyKaigi Effect in 2025: Top Ruby Companies 🌐
yasulab
PRO
1
130
FastMCPでMCPサーバー/クライアントを構築してみる
ttnyt8701
2
100
TypeScript Language Service Plugin で CSS Modules の開発体験を改善する
mizdra
PRO
3
2.5k
Javaのルールをねじ曲げろ!禁断の操作とその代償から学ぶメタプログラミング入門 / A Guide to Metaprogramming: Lessons from Forbidden Techniques and Their Price
nrslib
1
440
AIエージェントによるテストフレームワーク Arbigent
takahirom
0
280
TSConfigからTypeScriptの世界を覗く
planck16
2
1.3k
Babylon.js 8.0のアプデ情報を 軽率にキャッチアップ / catch-up-babylonjs-8
drumath2237
0
110
『Python → TypeScript』オンボーディング奮闘記
takumi_tatsuno
1
140
少数精鋭エンジニアがフルスタック力を磨く理由 -そしてAI時代へ-
rebase_engineering
0
130
Featured
See All Featured
Large-scale JavaScript Application Architecture
addyosmani
512
110k
How STYLIGHT went responsive
nonsquared
100
5.6k
The Invisible Side of Design
smashingmag
299
50k
GraphQLとの向き合い方2022年版
quramy
46
14k
KATA
mclloyd
29
14k
Templates, Plugins, & Blocks: Oh My! Creating the theme that thinks of everything
marktimemedia
30
2.4k
BBQ
matthewcrist
88
9.7k
ReactJS: Keep Simple. Everything can be a component!
pedronauck
667
120k
For a Future-Friendly Web
brad_frost
178
9.7k
Become a Pro
speakerdeck
PRO
28
5.4k
It's Worth the Effort
3n
184
28k
A Modern Web Designer's Workflow
chriscoyier
693
190k
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