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
89
Prioritizing Technical Debt
miccheng
0
130
JuniorDevSG - Intro to Coding Dojo
miccheng
0
120
Intro to Web Development with PHP - Lesson 1
miccheng
0
110
Engineers.SG Volunteers Training (4 Aug 2018)
miccheng
0
77
Introduction to PHPConf.Asia 2018
miccheng
0
680
What about Ruby on Rails?... from a PHP Guy
miccheng
0
120
Engineers.SG Volunteers Training (July 2017)
miccheng
0
84
Concourse CI in the Wild
miccheng
0
200
Other Decks in Programming
See All in Programming
DevFest Tokyo 2025 - Flutter のアプリアーキテクチャ現在地点
wasabeef
5
900
PHPで作るWebSocketサーバー ~リアクティブなアプリケーションを知るために~ / WebSocket Server in PHP - To know reactive applications
seike460
PRO
2
170
Асинхронность неизбежна: как мы проектировали сервис уведомлений
lamodatech
0
730
Stackless и stackful? Корутины и асинхронность в Go
lamodatech
0
720
useSyncExternalStoreを使いまくる
ssssota
6
1k
責務を分離するための例外設計 - PHPカンファレンス 2024
kajitack
1
560
42 best practices for Symfony, a decade later
tucksaun
1
180
PSR-15 はあなたのための ものではない? - phpcon2024
myamagishi
0
100
RWC 2024 DICOM & ISO/IEC 2022
m_seki
0
210
testcontainers のススメ
sgash708
1
120
ブラウザ単体でmp4書き出すまで - muddy-web - 2024-12
yue4u
2
460
ドメインイベント増えすぎ問題
h0r15h0
1
270
Featured
See All Featured
Producing Creativity
orderedlist
PRO
341
39k
How to train your dragon (web standard)
notwaldorf
88
5.7k
Building an army of robots
kneath
302
44k
BBQ
matthewcrist
85
9.4k
No one is an island. Learnings from fostering a developers community.
thoeni
19
3k
Visualization
eitanlees
146
15k
Save Time (by Creating Custom Rails Generators)
garrettdimon
PRO
28
900
Stop Working from a Prison Cell
hatefulcrawdad
267
20k
The Pragmatic Product Professional
lauravandoore
32
6.3k
Reflections from 52 weeks, 52 projects
jeffersonlam
347
20k
StorybookのUI Testing Handbookを読んだ
zakiyama
27
5.3k
Gamification - CAS2011
davidbonilla
80
5.1k
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