Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Sign up for free
Menu
Search
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Pricing
Search
Sign in
Sign up for free
How Much Should We Test?
Search
Michael Cheng
March 09, 2017
Programming
240
1
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
How Much Should We Test?
Presented at SP Tech Talk
Michael Cheng
March 09, 2017
Transcript
21 slides
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
More Decks by Michael Cheng
See All by Michael Cheng
Getting Started with Vibe Coding
miccheng
0
230
Intro to GraphQL Workshop
miccheng
0
180
Prioritizing Technical Debt
miccheng
0
220
JuniorDevSG - Intro to Coding Dojo
miccheng
0
200
Intro to Web Development with PHP - Lesson 1
miccheng
0
180
Engineers.SG Volunteers Training (4 Aug 2018)
miccheng
0
140
Introduction to PHPConf.Asia 2018
miccheng
0
830
What about Ruby on Rails?... from a PHP Guy
miccheng
0
200
Engineers.SG Volunteers Training (July 2017)
miccheng
0
150
Other Decks in Programming
See All in Programming
RaspberryPi 5で軽くはじめるk3sとtailscaleを用いたホームサーバー構築 (1)
nasum
0
190
小さなアプリを作って公開するまで
onozaty
0
180
Enforcing Your Architecture with Unit Tests in the AI Era (Swift Connection X)
steliosf
PRO
1
180
自宅サーバはどこまで再現できるのか - Proxmox VE上のVM環境をIaCとバックアップで戻してみた
youto
0
310
선언형 햅틱 라이브러리 진동을 소개합니다
l2hyunwoo
1
320
そのデザイントークン、Flutterでも同じ見た目になりますか?
nakamizu
0
370
Kawaiicon: Kubernetes, it's no longer cool, but let's secure it anyway!
barnbarn
0
130
GraphQL の onError と Nullability のこれから
quramy
0
220
baseline으로 마이그레이션, 리팩토링 안전하게 맡기기
fornewid
1
990
Beyond Chatbots: Agentic UI with Open Standards @W-JAX 2026, München
manfredsteyer
PRO
0
100
Growing PicoRuby's Ecosystem on ESP32
yuuu
2
140
作れるエンジニアから、価値を届けるエンジニアへ
ryunakayama
1
290
Featured
See All Featured
The Organizational Zoo: Understanding Human Behavior Agility Through Metaphoric Constructive Conversations (based on the works of Arthur Shelley, Ph.D)
kimpetersen
PRO
0
540
SEO in 2025: How to Prepare for the Future of Search
ipullrank
3
3.9k
[Rails World 2026] Durable orchestration on Rails: from continuation to workflow
palkan
4
1.3k
How to Align SEO within the Product Triangle To Get Buy-In & Support - #RIMC
aleyda
2
1.9k
Being A Developer After 40
akosma
PRO
92
590k
Max Prin - Stacking Signals: How International SEO Comes Together (And Falls Apart)
techseoconnect
PRO
0
530
16th Malabo Montpellier Forum Presentation
akademiya2063
PRO
0
460
Code Review Best Practice
trishagee
74
20k
HU Berlin: Industrial-Strength Natural Language Processing with spaCy and Prodigy
inesmontani
PRO
0
810
How STYLIGHT went responsive
nonsquared
100
6.4k
The Power of CSS Pseudo Elements
geoffreycrofte
82
6.6k
世界の人気アプリ100個を分析して見えたペイウォール設計の心得
akihiro_kokubo
PRO
74
43k