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
330
2
Share
How to write good tests?
Small talk that I gave to @debitoor guys about practices of writing tests.
Alexander Beletsky
April 12, 2013
More Decks by Alexander Beletsky
See All by Alexander Beletsky
Snapshot Testing: Going beyond UI
alexbeletsky
1
690
Tech Culture in Startups
alexbeletsky
0
240
TDD in JavaScript
alexbeletsky
4
860
This is Node.js
alexbeletsky
10
450
Likeastore
alexbeletsky
3
150
PaaS in your pocker with Dokku
alexbeletsky
7
2.6k
Building Single Page Applications
alexbeletsky
9
5.5k
.NET developer in JavaScript world
alexbeletsky
1
2.9k
Dynamic web development with Oak
alexbeletsky
1
630
Other Decks in Programming
See All in Programming
実践CRDT
tamadeveloper
0
460
ハンズオンで学ぶクラウドネイティブ
tatsukiminami
0
120
今からFlash開発できるわけないじゃん、ムリムリ! (※ムリじゃなかった!?)
arkw
0
190
AI時代のPhpStorm最新事情 #phpcon_odawara
yusuke
0
160
PHP で mp3 プレイヤーを実装しよう
m3m0r7
PRO
0
250
煩雑なSkills管理をSoC(関心の分離)により解決する――関心を分離し、プロンプトを部品として育てるためのOSSを作った話 / Solving Complex Skills Management Through SoC (Separation of Concerns)
nrslib
4
870
Going Multiplatform with Your Android App (Android Makers 2026)
zsmb
2
390
Laravel Nightwatchの裏側 - Laravel公式Observabilityツールを支える設計と実装
avosalmon
1
330
Go_College_最終発表資料__外部公開用_.pdf
xe_pc23
0
190
Codex CLIのSubagentsによる並列API実装 / Parallel API Implementation with Codex CLI Subagents
takatty
2
890
2026-03-27 #terminalnight 変数展開とコマンド展開でターミナル作業をスマートにする方法
masasuzu
0
320
forteeの改修から振り返るPHPerKaigi 2026
muno92
PRO
3
270
Featured
See All Featured
Faster Mobile Websites
deanohume
310
31k
Designing for Timeless Needs
cassininazir
0
190
Agile that works and the tools we love
rasmusluckow
331
21k
How to build an LLM SEO readiness audit: a practical framework
nmsamuel
1
710
Why Our Code Smells
bkeepers
PRO
340
58k
エンジニアに許された特別な時間の終わり
watany
106
240k
Art, The Web, and Tiny UX
lynnandtonic
304
21k
For a Future-Friendly Web
brad_frost
183
10k
How GitHub (no longer) Works
holman
316
150k
Redefining SEO in the New Era of Traffic Generation
szymonslowik
1
270
Why You Should Never Use an ORM
jnunemaker
PRO
61
9.8k
Intergalactic Javascript Robots from Outer Space
tanoku
273
27k
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