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
Sponsored
·
Your Podcast. Everywhere. Effortlessly.
Share. Educate. Inspire. Entertain. You do you. We'll handle the rest.
→
Michael Cheng
March 09, 2017
Programming
220
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
More Decks by Michael Cheng
See All by Michael Cheng
Intro to GraphQL Workshop
miccheng
0
160
Prioritizing Technical Debt
miccheng
0
200
JuniorDevSG - Intro to Coding Dojo
miccheng
0
190
Intro to Web Development with PHP - Lesson 1
miccheng
0
160
Engineers.SG Volunteers Training (4 Aug 2018)
miccheng
0
110
Introduction to PHPConf.Asia 2018
miccheng
0
790
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
生成AI時代にこそ効くGo | Why Go Works in the Age of Generative AI
mom0tomo
8
3.3k
作って学ぶ、 JSX (TSX) ランタイムの基本
syumai
7
1.7k
決定論的オーケストレーションの設計と実装 / Design and Implementation of Deterministic Orchestration
nrslib
4
1.5k
IBM Bobを活用したレガシーアプリの最新化
oniak3ibm
PRO
1
210
Lemonade + Foundry Toolkit でお手軽アプリ開発
seosoft
1
360
Observability in Practice:Grafana 與 Edge Device SRE 的那些事
blueswen
0
170
トークンをケチるな、設計しろ:GitHub Copilotを賢く使うコンテキスト戦略
ochtum
0
120
ローカルLLMを使ってB2Bサービスを作っていての学び
yaotti
0
200
肥大化するレガシーコードに立ち向かうためのインターフェース分離と依存の逆転 / JJUG CCC 2026 Spring
hirokunimaeta
0
590
正しくソフトウェアを作る、前提を疑うための認知の視点 / doubt-premise
minodriven
21
6.9k
Spec Driven Development | AI Summit Lisbon
danielsogl
PRO
0
200
Contextとはなにか
chiroruxx
1
350
Featured
See All Featured
Measuring & Analyzing Core Web Vitals
bluesmoon
9
870
Designing Powerful Visuals for Engaging Learning
tmiket
1
420
[RailsConf 2023 Opening Keynote] The Magic of Rails
eileencodes
31
10k
Site-Speed That Sticks
csswizardry
13
1.2k
Organizational Design Perspectives: An Ontology of Organizational Design Elements
kimpetersen
PRO
1
750
Test your architecture with Archunit
thirion
1
2.3k
How to audit for AI Accessibility on your Front & Back End
davetheseo
0
440
How to Think Like a Performance Engineer
csswizardry
28
2.7k
Optimising Largest Contentful Paint
csswizardry
37
3.7k
Impact Scores and Hybrid Strategies: The future of link building
tamaranovitovic
0
310
A Modern Web Designer's Workflow
chriscoyier
698
190k
The AI Search Optimization Roadmap by Aleyda Solis
aleyda
1
5.9k
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