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
Sponsored
·
Ship Features Fearlessly
Turn features on and off without deploys. Used by thousands of Ruby developers.
→
Alexander Beletsky
April 12, 2013
Programming
330
2
Share
How to write good tests?
Small talk that I gave to @debitoor guys about practices of writing tests.
Alexander Beletsky
April 12, 2013
More Decks by Alexander Beletsky
See All by Alexander Beletsky
Snapshot Testing: Going beyond UI
alexbeletsky
1
690
Tech Culture in Startups
alexbeletsky
0
240
TDD in JavaScript
alexbeletsky
4
860
This is Node.js
alexbeletsky
10
450
Likeastore
alexbeletsky
3
150
PaaS in your pocker with Dokku
alexbeletsky
7
2.6k
Building Single Page Applications
alexbeletsky
9
5.5k
.NET developer in JavaScript world
alexbeletsky
1
2.9k
Dynamic web development with Oak
alexbeletsky
1
630
Other Decks in Programming
See All in Programming
[PHPerKaigi 2026]PHPerKaigi2025の企画CodeGolfが最高すぎて社内で内製して半年運営して得た内製と運営の知見
ikezoemakoto
0
340
ファインチューニングせずメインコンペを解く方法
pokutuna
0
300
2026-03-27 #terminalnight 変数展開とコマンド展開でターミナル作業をスマートにする方法
masasuzu
0
320
L’IA au service des devs : Anatomie d'un assistant de Code Review
toham
0
230
ドメインイベントでビジネスロジックを解きほぐす #phpcon_odawara
kajitack
2
140
今こそ押さえておきたい アマゾンウェブサービス(AWS)の データベースの基礎 おもクラ #6版
satoshi256kbyte
1
240
KagglerがMixSeekを触ってみた
morim
0
370
PHPのバージョンアップ時にも役立ったAST(2026年版)
matsuo_atsushi
0
300
車輪の再発明をしよう!PHP で実装して学ぶ、Web サーバーの仕組みと HTTP の正体
h1r0
3
520
Getting more out of Maven
mlvandijk
0
110
感情を設計する
ichimichi
5
1.4k
「接続」—パフォーマンスチューニングの最後の一手 〜点と点を結ぶ、その一瞬のために〜
kentaroutakeda
5
2.5k
Featured
See All Featured
Highjacked: Video Game Concept Design
rkendrick25
PRO
1
340
Build The Right Thing And Hit Your Dates
maggiecrowley
39
3.1k
Everyday Curiosity
cassininazir
0
190
New Earth Scene 8
popppiees
3
2k
Understanding Cognitive Biases in Performance Measurement
bluesmoon
32
2.8k
Refactoring Trust on Your Teams (GOTO; Chicago 2020)
rmw
35
3.4k
The Hidden Cost of Media on the Web [PixelPalooza 2025]
tammyeverts
2
260
The B2B funnel & how to create a winning content strategy
katarinadahlin
PRO
1
330
Scaling GitHub
holman
464
140k
Leo the Paperboy
mayatellez
7
1.6k
How to build a perfect <img>
jonoalderson
1
5.4k
Prompt Engineering for Job Search
mfonobong
0
260
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