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
Sponsored
·
Ship Features Fearlessly
Turn features on and off without deploys. Used by thousands of Ruby developers.
→
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
240
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
Ruby から Emacs を操作したい
phigasui
0
360
オーケストレーション記述言語 Katari
yukikurage
0
270
将来の標準フォーマッター?ktfmtを深堀る
t45k
0
220
動画プレイヤーはなぜカクつくのか 〜Flutterのレンダリングとネイティブの境界を解剖する〜
naruogram
0
340
graphql-ruby を Spinel で速くしようとした話
mtsmfm
0
150
선언형 햅틱 라이브러리 진동을 소개합니다
l2hyunwoo
1
320
高橋メソッドでCVE解説シリーズ 〜CVE-2026-112816〜
hakkadaikon
0
270
SONY CISC-NEWS NWS-1750 + NWB-225 ハードウェアメンテとフレームバッファカラー対応 / KOF2026
tsutsui
0
120
TS 7.0 で baseUrl が使えなくなった今、パスエイリアスをどうするか
bicstone
2
750
疎結合とは何か?ソフトウェア設計における結合バランスについて考える #phpcon_niigata
kajitack
2
380
コード生成時代のAPI定義を支えるRequest Spec移行
pvcresin
0
290
flutter_test のその先へ — Flutter アプリの LLM 機能に「評価」という品質保証を
kosukesaigusa
0
210
Featured
See All Featured
Unlocking the hidden potential of vector embeddings in international SEO
frankvandijk
0
1k
Exploring the Power of Turbo Streams & Action Cable | RailsConf2023
kevinliebholz
37
6.7k
The Cult of Friendly URLs
andyhume
79
7.1k
Building Flexible Design Systems
yeseniaperezcruz
330
41k
コードの90%をAIが書く世界で何が待っているのか / What awaits us in a world where 90% of the code is written by AI
rkaga
63
48k
The State of eCommerce SEO: How to Win in Today's Products SERPs - #SEOweek
aleyda
2
12k
Visualizing Your Data: Incorporating Mongo into Loggly Infrastructure
mongodb
50
10k
Six Lessons from altMBA
skipperchong
29
4.6k
Lightning Talk: Beautiful Slides for Beginners
inesmontani
PRO
2
850
Crafting Experiences
bethany
1
450
Writing Fast Ruby
sferik
630
63k
Avoiding the “Bad Training, Faster” Trap in the Age of AI
tmiket
1
310