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
170
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
85
Prioritizing Technical Debt
miccheng
0
120
JuniorDevSG - Intro to Coding Dojo
miccheng
0
120
Intro to Web Development with PHP - Lesson 1
miccheng
0
100
Engineers.SG Volunteers Training (4 Aug 2018)
miccheng
0
76
Introduction to PHPConf.Asia 2018
miccheng
0
670
What about Ruby on Rails?... from a PHP Guy
miccheng
0
120
Engineers.SG Volunteers Training (July 2017)
miccheng
0
79
Concourse CI in the Wild
miccheng
0
190
Other Decks in Programming
See All in Programming
RDBの世界をぬりかえていくモデルグラフDB〜truncus graphによるモデルファースト開発〜
jurabi
0
150
自分だけの世界を創るクリエイティブコーディング / Creative Coding: Creating Your Own World
chobishiba
1
160
実践Dash - 手を抜きながら本気で作るデータApplicationの基本と応用 / Dash for Python and Baseball
shinyorke
2
220
Composing an API the *right* way (Droidcon New York 2024)
zsmb
2
550
NEWTにおけるiOS18対応の進め方
ryu1sazae
0
180
App Router 悲喜交々
quramy
7
370
Flutterアプリを生成AIで生成する勘所
rizumita
0
250
DjangoNinjaで高速なAPI開発を実現する
masaya00
0
430
上手に付き合うコンポーネントテスト
quramy
3
1.2k
2024-10-02 dev2next - Application Observability like you've never heard before
jonatan_ivanov
0
150
AWS認定資格を受験するにあたり、気づいたこと・実践していたことのまとめ
satoshi256kbyte
1
120
個人開発で使ってるやつを紹介する回
yohfee
1
650
Featured
See All Featured
GraphQLの誤解/rethinking-graphql
sonatard
65
9.9k
個人開発の失敗を避けるイケてる考え方 / tips for indie hackers
panda_program
92
16k
The Art of Programming - Codeland 2020
erikaheidi
50
13k
Become a Pro
speakerdeck
PRO
24
4.9k
From Idea to $5000 a Month in 5 Months
shpigford
380
46k
The Success of Rails: Ensuring Growth for the Next 100 Years
eileencodes
42
6.5k
XXLCSS - How to scale CSS and keep your sanity
sugarenia
246
1.3M
Templates, Plugins, & Blocks: Oh My! Creating the theme that thinks of everything
marktimemedia
26
2k
The Mythical Team-Month
searls
218
43k
Creatively Recalculating Your Daily Design Routine
revolveconf
217
12k
Fontdeck: Realign not Redesign
paulrobertlloyd
81
5.2k
WebSockets: Embracing the real-time Web
robhawkes
59
7.3k
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