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 to write good tests?
Search
Alexander Beletsky
April 12, 2013
Programming
2
250
How to write good tests?
Small talk that I gave to @debitoor guys about practices of writing tests.
Alexander Beletsky
April 12, 2013
Tweet
Share
More Decks by Alexander Beletsky
See All by Alexander Beletsky
Snapshot Testing: Going beyond UI
alexbeletsky
1
530
Tech Culture in Startups
alexbeletsky
0
150
TDD in JavaScript
alexbeletsky
4
830
This is Node.js
alexbeletsky
10
370
Likeastore
alexbeletsky
3
120
PaaS in your pocker with Dokku
alexbeletsky
7
2.3k
Building Single Page Applications
alexbeletsky
9
5.2k
.NET developer in JavaScript world
alexbeletsky
1
2.6k
Dynamic web development with Oak
alexbeletsky
1
570
Other Decks in Programming
See All in Programming
Code Reviews
bkuhlmann
4
890
見た目から始める生産性向上
ikumatadokoro
8
980
Rubyでたのしむクリエイティブコーディング/Enjoy Creative coding with Ruby
chobishiba
1
200
PHPはいつから死んでいるかの調査
chiroruxx
1
400
Snowflakeで眠ったデータを起こそう!
estie
0
120
R言語の環境構築と基礎 Tokyo.R 112
bob3bob3
0
270
禅の心を手に入れよ
eltociear
1
170
はてなにおける CSS Modules、及び CSS Modules に足りないもの / CSS Modules in Hatena, and CSS Modules missing parts
mizdra
7
950
Elm Form Validation
bkuhlmann
0
510
MetricKitで予期せぬ終了を検知する話 / Detect unexpected termination with MetricKit
nekowen
1
190
AmperとFleetを使ったAndroidアプリ
yoppie
0
210
『Railsオワコン』と言われる時代に、なぜブルーモ証券はRailsを選ぶのか
free_world21
0
270
Featured
See All Featured
Responsive Adventures: Dirty Tricks From The Dark Corners of Front-End
smashingmag
244
20k
Put a Button on it: Removing Barriers to Going Fast.
kastner
58
3.1k
Why Our Code Smells
bkeepers
PRO
331
56k
Infographics Made Easy
chrislema
238
18k
Building Better People: How to give real-time feedback that sticks.
wjessup
355
18k
Making Projects Easy
brettharned
108
5.5k
RailsConf & Balkan Ruby 2019: The Past, Present, and Future of Rails at GitHub
eileencodes
125
32k
Optimizing for Happiness
mojombo
370
69k
What's in a price? How to price your products and services
michaelherold
237
11k
Fireside Chat
paigeccino
21
2.6k
Code Reviewing Like a Champion
maltzj
514
39k
個人開発の失敗を避けるイケてる考え方 / tips for indie hackers
panda_program
60
14k
Transcript
How to write good tests?
Honestly, I don’t know
But, there are properties of good tests…
… are written before code
… are running very fast
… are helping to find regressions
Writing unit tests is not about code verification
… it’s about code quality and design
Think different Think TDD
Could TDD be applied to everything?
In short, yes code, requirements, ui
Should TDD be applied to everything?
Probably, no simple tasks, prototypes
There are few techniques of writing tests
Classic school Kent Beck, 90’s Inside-Out design Focusing on logic
(algorithms)
London school Jason Gorman, 00’s Outside-In design Focusing on collaboration
Mocks
What about integration tests?
They are slow, hard to write, hard to setup… but
… they usually caught most nasty bugs.
None
Maintaining test driven cycle
None
Acceptance test (PO communication) API (integration) tests Utils (units) tests
Thanks, @alexbeletsky