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
600
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.4k
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
『改訂新版 良いコード/悪いコードで学ぶ設計入門』活用方法−爆速でスキルアップする!効果的な学習アプローチ / effective-learning-of-good-code
minodriven
29
4.5k
Внедряем бюджетирование, или Как сделать хорошо?
lamodatech
0
960
令和7年版 あなたが使ってよいフロントエンド機能とは
mugi_uno
12
5.8k
月刊 競技プログラミングをお仕事に役立てるには
terryu16
1
1.2k
CNCF Project の作者が考えている OSS の運営
utam0k
5
530
Amazon Bedrock Multi Agentsを試してきた
tm2
1
120
Simple組み合わせ村から大都会Railsにやってきた俺は / Coming to Rails from the Simple
moznion
3
3.2k
ASP.NET Core の OpenAPIサポート
h455h1
0
140
いりゃあせ、PHPカンファレンス名古屋2025 / Welcome to PHP Conference Nagoya 2025
ttskch
1
220
ドメインイベント増えすぎ問題
h0r15h0
2
590
ISUCON14公式反省会LT: 社内ISUCONの話
astj
PRO
0
120
サーバーゆる勉強会 DBMS の仕組み編
kj455
1
320
Featured
See All Featured
Docker and Python
trallard
43
3.2k
The Straight Up "How To Draw Better" Workshop
denniskardys
232
140k
How to Ace a Technical Interview
jacobian
276
23k
How to Create Impact in a Changing Tech Landscape [PerfNow 2023]
tammyeverts
49
2.2k
"I'm Feeling Lucky" - Building Great Search Experiences for Today's Users (#IAC19)
danielanewman
226
22k
Writing Fast Ruby
sferik
628
61k
Evolution of real-time – Irina Nazarova, EuRuKo, 2024
irinanazarova
6
510
Fight the Zombie Pattern Library - RWD Summit 2016
marcelosomers
232
17k
Building Better People: How to give real-time feedback that sticks.
wjessup
366
19k
How STYLIGHT went responsive
nonsquared
96
5.3k
KATA
mclloyd
29
14k
Why You Should Never Use an ORM
jnunemaker
PRO
55
9.2k
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