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
310
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.8k
Dynamic web development with Oak
alexbeletsky
1
610
Other Decks in Programming
See All in Programming
AI駆動開発カンファレンスAutumn2025 _AI駆動開発にはAI駆動品質保証
autifyhq
0
150
Private APIの呼び出し方
kishikawakatsumi
2
830
FlutterKaigi 2025 システム裏側
yumnumm
0
770
2025 컴포즈 마법사
jisungbin
0
100
競馬で学ぶ機械学習の基本と実践 / Machine Learning with Horse Racing
shoheimitani
7
6.4k
Nitro v3
kazupon
2
280
What’s Fair is FAIR: A Decentralised Future for WordPress Distribution
rmccue
0
160
AIエージェントでのJava開発がはかどるMCPをAIを使って開発してみた / java mcp for jjug
kishida
4
400
仕様がそのままテストになる!Javaで始める振る舞い駆動開発
ohmori_yusuke
5
2.8k
ボトムアップの生成AI活用を推進する社内AIエージェント開発
aku11i
0
1.6k
Functional Calisthenics in Kotlin: Kotlinで「関数型エクササイズ」を実践しよう
lagenorhynque
0
120
「正規表現をつくる」をつくる / make "make regex"
makenowjust
1
290
Featured
See All Featured
A better future with KSS
kneath
239
18k
10 Git Anti Patterns You Should be Aware of
lemiorhan
PRO
658
61k
Producing Creativity
orderedlist
PRO
348
40k
Writing Fast Ruby
sferik
630
62k
Performance Is Good for Brains [We Love Speed 2024]
tammyeverts
12
1.3k
Thoughts on Productivity
jonyablonski
73
4.9k
Dealing with People You Can't Stand - Big Design 2015
cassininazir
367
27k
Design and Strategy: How to Deal with People Who Don’t "Get" Design
morganepeng
132
19k
Intergalactic Javascript Robots from Outer Space
tanoku
273
27k
Refactoring Trust on Your Teams (GOTO; Chicago 2020)
rmw
35
3.2k
Side Projects
sachag
455
43k
Reflections from 52 weeks, 52 projects
jeffersonlam
355
21k
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