Upgrade to PRO for Only $50/Year—Limited-Time Offer! 🔥
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
320
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
670
Tech Culture in Startups
alexbeletsky
0
220
TDD in JavaScript
alexbeletsky
4
850
This is Node.js
alexbeletsky
10
440
Likeastore
alexbeletsky
3
130
PaaS in your pocker with Dokku
alexbeletsky
7
2.6k
Building Single Page Applications
alexbeletsky
9
5.4k
.NET developer in JavaScript world
alexbeletsky
1
2.9k
Dynamic web development with Oak
alexbeletsky
1
610
Other Decks in Programming
See All in Programming
Why Kotlin? 電子カルテを Kotlin で開発する理由 / Why Kotlin? at Henry
agatan
2
7k
Context is King? 〜Verifiability時代とコンテキスト設計 / Beyond "Context is King"
rkaga
9
1.1k
Developing static sites with Ruby
okuramasafumi
0
270
Socio-Technical Evolution: Growing an Architecture and Its Organization for Fast Flow
cer
PRO
0
320
ゲームの物理 剛体編
fadis
0
330
AWS CDKの推しポイントN選
akihisaikeda
1
240
バックエンドエンジニアによる Amebaブログ K8s 基盤への CronJobの導入・運用経験
sunabig
0
150
SwiftUIで本格音ゲー実装してみた
hypebeans
0
160
エディターってAIで操作できるんだぜ
kis9a
0
710
まだ間に合う!Claude Code元年をふりかえる
nogu66
5
790
Cap'n Webについて
yusukebe
0
130
組み合わせ爆発にのまれない - 責務分割 x テスト
halhorn
1
140
Featured
See All Featured
The Hidden Cost of Media on the Web [PixelPalooza 2025]
tammyeverts
1
97
CoffeeScript is Beautiful & I Never Want to Write Plain JavaScript Again
sstephenson
162
16k
Save Time (by Creating Custom Rails Generators)
garrettdimon
PRO
32
1.8k
Why Our Code Smells
bkeepers
PRO
340
57k
Building Adaptive Systems
keathley
44
2.9k
StorybookのUI Testing Handbookを読んだ
zakiyama
31
6.4k
Fight the Zombie Pattern Library - RWD Summit 2016
marcelosomers
234
17k
10 Git Anti Patterns You Should be Aware of
lemiorhan
PRO
659
61k
Into the Great Unknown - MozCon
thekraken
40
2.2k
The Web Performance Landscape in 2024 [PerfNow 2024]
tammyeverts
12
970
RailsConf 2023
tenderlove
30
1.3k
[RailsConf 2023] Rails as a piece of cake
palkan
58
6.1k
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