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
280
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
610
Tech Culture in Startups
alexbeletsky
0
180
TDD in JavaScript
alexbeletsky
4
830
This is Node.js
alexbeletsky
10
400
Likeastore
alexbeletsky
3
120
PaaS in your pocker with Dokku
alexbeletsky
7
2.5k
Building Single Page Applications
alexbeletsky
9
5.3k
.NET developer in JavaScript world
alexbeletsky
1
2.7k
Dynamic web development with Oak
alexbeletsky
1
580
Other Decks in Programming
See All in Programming
PHPカンファレンス名古屋2025 タスク分解の試行錯誤〜レビュー負荷を下げるために〜
soichi
1
190
Pythonでもちょっとリッチな見た目のアプリを設計してみる
ueponx
1
560
AWS Organizations で実現する、 マルチ AWS アカウントのルートユーザー管理からの脱却
atpons
0
150
GAEログのコスト削減
mot_techtalk
0
120
データベースのオペレーターであるCloudNativePGがStatefulSetを使わない理由に迫る
nnaka2992
0
150
2,500万ユーザーを支えるSREチームの6年間のスクラムのカイゼン
honmarkhunt
6
5.3k
Immutable ActiveRecord
megane42
0
140
Domain-Driven Transformation
hschwentner
2
1.9k
2024年のWebフロントエンドのふりかえりと2025年
sakito
2
250
昭和の職場からアジャイルの世界へ
kumagoro95
1
380
苦しいTiDBへの移行を乗り越えて快適な運用を目指す
leveragestech
0
580
Amazon Bedrock Multi Agentsを試してきた
tm2
1
290
Featured
See All Featured
Designing for humans not robots
tammielis
250
25k
Music & Morning Musume
bryan
46
6.3k
Build your cross-platform service in a week with App Engine
jlugia
229
18k
GitHub's CSS Performance
jonrohan
1030
460k
The MySQL Ecosystem @ GitHub 2015
samlambert
250
12k
Building an army of robots
kneath
303
45k
Design and Strategy: How to Deal with People Who Don’t "Get" Design
morganepeng
129
19k
Intergalactic Javascript Robots from Outer Space
tanoku
270
27k
Improving Core Web Vitals using Speculation Rules API
sergeychernyshev
9
440
Docker and Python
trallard
44
3.3k
Gamification - CAS2011
davidbonilla
80
5.1k
Faster Mobile Websites
deanohume
306
31k
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