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
300
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
620
Tech Culture in Startups
alexbeletsky
0
190
TDD in JavaScript
alexbeletsky
4
840
This is Node.js
alexbeletsky
10
410
Likeastore
alexbeletsky
3
130
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.8k
Dynamic web development with Oak
alexbeletsky
1
590
Other Decks in Programming
See All in Programming
custom_lintで始めるチームルール管理
akaboshinit
0
150
보일러플레이트 코드가 진짜 나쁜 건가요?
gaeun5744
0
380
Go1.24 go vetとtestsアナライザ
kuro_kurorrr
2
700
CTFのWebにおける⾼難易度問題について
hamayanhamayan
1
1k
PHPによる"非"構造化プログラミング入門 -本当に熱いスパゲティコードを求めて- #phperkaigi
o0h
PRO
0
1.1k
Windows版PHPのビルド手順とPHP 8.4における変更点
matsuo_atsushi
0
370
Boost Your Performance and Developer Productivity with Jakarta EE 11
ivargrimstad
0
350
自分のために作ったアプリが、グローバルに使われるまで / Indie App Development Lunch LT
pixyzehn
1
130
ローコードサービスの進化のためのモノレポ移行
taro28
1
340
Day0 初心者向けワークショップ実践!ソフトウェアテストの第一歩
satohiroyuki
0
460
Go1.24で testing.B.Loopが爆誕
kuro_kurorrr
0
170
2025/3/18 サービスの成長で生じる幅広いパフォーマンスの問題を、 AIで手軽に解決する
shirahama_x
0
170
Featured
See All Featured
Fantastic passwords and where to find them - at NoRuKo
philnash
51
3.1k
Chrome DevTools: State of the Union 2024 - Debugging React & Beyond
addyosmani
4
480
Easily Structure & Communicate Ideas using Wireframe
afnizarnur
194
16k
The Art of Delivering Value - GDevCon NA Keynote
reverentgeek
12
1.4k
Fight the Zombie Pattern Library - RWD Summit 2016
marcelosomers
233
17k
Git: the NoSQL Database
bkeepers
PRO
429
65k
Side Projects
sachag
452
42k
Fontdeck: Realign not Redesign
paulrobertlloyd
83
5.5k
Dealing with People You Can't Stand - Big Design 2015
cassininazir
367
25k
Rebuilding a faster, lazier Slack
samanthasiow
80
8.9k
Thoughts on Productivity
jonyablonski
69
4.5k
GitHub's CSS Performance
jonrohan
1030
460k
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