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
230
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
170
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
120
Introduction to PHPConf.Asia 2018
miccheng
0
800
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
Go言語とトイモデルで学ぶTransformerの気持ち / fukuokago23-transformer
monochromegane
0
160
TSX の <Hoge<Fuga>> という構文に驚いた話 / tsx-type-argument-syntax
kanaru0928
0
200
Claude Team Plan導入・ガイド
tk3fftk
0
250
テーブルをDELETEした
yuzneri
0
130
AI Engineeringは、AIプロダクトだけのものか? 〜AIがソフトウェアを作る時代の新しい当たり前〜 / No AI in your product. AI Engineering in your development.
rkaga
4
350
わからない話を追いかけたら、プログラミング言語を作る側にいた
ydah
3
430
20260722_microCMSで考える、AI時代のコンテンツ運用設計
yosh1
0
270
これって Effect でできたのでは? / TSKaigi Mashup Kansai #2
susisu
0
140
今さら聞けない .NET CLI
htkym
0
170
【やさしく解説 設計編・中級 #1】一つの車に、運転手は一人 ~ある倉庫システムの事例から~
panda728
PRO
0
200
Laravel Boostに学ぶ、AIにPHPを書かせる技術 〜OSSの実装から蒸留するエージェント制御の王道〜
kentaroutakeda
3
640
ビデオ通話が繋がる0.2秒で何が起きているのか
supurazako
2
170
Featured
See All Featured
SEOcharity - Dark patterns in SEO and UX: How to avoid them and build a more ethical web
sarafernandez
0
230
Skip the Path - Find Your Career Trail
mkilby
1
180
Context Engineering - Making Every Token Count
addyosmani
9
1k
Applied NLP in the Age of Generative AI
inesmontani
PRO
4
2.4k
Efficient Content Optimization with Google Search Console & Apps Script
katarinadahlin
PRO
1
760
Being A Developer After 40
akosma
91
590k
End of SEO as We Know It (SMX Advanced Version)
ipullrank
3
4.3k
Stewardship and Sustainability of Urban and Community Forests
pwiseman
0
420
Building Applications with DynamoDB
mza
96
7.2k
How To Stay Up To Date on Web Technology
chriscoyier
790
250k
KATA
mclloyd
PRO
35
15k
Refactoring Trust on Your Teams (GOTO; Chicago 2020)
rmw
35
3.7k
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