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
77
Prioritizing Technical Debt
miccheng
0
110
JuniorDevSG - Intro to Coding Dojo
miccheng
0
110
Intro to Web Development with PHP - Lesson 1
miccheng
0
98
Engineers.SG Volunteers Training (4 Aug 2018)
miccheng
0
73
Introduction to PHPConf.Asia 2018
miccheng
0
640
What about Ruby on Rails?... from a PHP Guy
miccheng
0
110
Engineers.SG Volunteers Training (July 2017)
miccheng
0
75
Concourse CI in the Wild
miccheng
0
160
Other Decks in Programming
See All in Programming
Amazon SQSコンシューマー疎結合への旅 - 出張! #DevelopersIO IT技術ブログの中の人が語る勉強会 #3
quiver
0
300
Git Lint
bkuhlmann
4
760
Domain-Driven Transformation
hschwentner
2
1.5k
Ruby GitHub Packages
bkuhlmann
0
640
Fragment Composition of GraphQL
quramy
13
1.4k
FigmaとPHPで作る1ミリたりとも表示崩れしない最強の帳票印刷ソリューション
ttskch
43
19k
Java 22 Overview
kishida
1
190
スキーマ駆動開発による品質とスピードの両立 - 私達は何故、スキーマを書くのか
kentaroutakeda
0
180
『Railsオワコン』と言われる時代に、なぜブルーモ証券はRailsを選ぶのか
free_world21
1
350
単体テストを書かない技術 #phpcon_odawara
o0h
PRO
27
8.5k
Netty Chicago Java User Group 2024-04-17
sullis
0
200
SwiftUIで使いやすいToastの作り方 / How to build a Toast system which is easy to use in SwiftUI
lovee
3
170
Featured
See All Featured
Easily Structure & Communicate Ideas using Wireframe
afnizarnur
188
16k
Building Better People: How to give real-time feedback that sticks.
wjessup
356
18k
Automating Front-end Workflow
addyosmani
1357
200k
Creating an realtime collaboration tool: Agile Flush - .NET Oxford
marcduiker
14
1.5k
How GitHub (no longer) Works
holman
305
140k
Mobile First: as difficult as doing things right
swwweet
217
8.6k
Bash Introduction
62gerente
605
210k
Distributed Sagas: A Protocol for Coordinating Microservices
caitiem20
323
20k
Designing Experiences People Love
moore
136
23k
How STYLIGHT went responsive
nonsquared
92
4.8k
Stop Working from a Prison Cell
hatefulcrawdad
267
19k
The World Runs on Bad Software
bkeepers
PRO
61
6.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