Lock in $30 Savings on PRO—Offer Ends Soon! ⏳
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.8k
Dynamic web development with Oak
alexbeletsky
1
610
Other Decks in Programming
See All in Programming
令和最新版Android Studioで化石デバイス向けアプリを作る
arkw
0
370
ViewファーストなRailsアプリ開発のたのしさ
sugiwe
0
430
スタートアップを支える技術戦略と組織づくり
pospome
8
15k
ゲームの物理 剛体編
fadis
0
310
251126 TestState APIってなんだっけ?Step Functionsテストどう変わる?
east_takumi
0
310
Cap'n Webについて
yusukebe
0
110
認証・認可の基本を学ぼう前編
kouyuume
0
190
Context is King? 〜Verifiability時代とコンテキスト設計 / Beyond "Context is King"
rkaga
3
540
テストやOSS開発に役立つSetup PHP Action
matsuo_atsushi
0
140
【Streamlit x Snowflake】データ基盤からアプリ開発・AI活用まで、すべてをSnowflake内で実現
ayumu_yamaguchi
1
110
NUMA環境とコンテナランタイム ― youki における Linux Memory Policy 実装
n4mlz
1
210
【CA.ai #3】Google ADKを活用したAI Agent開発と運用知見
harappa80
0
290
Featured
See All Featured
Balancing Empowerment & Direction
lara
5
790
The Cult of Friendly URLs
andyhume
79
6.7k
Fantastic passwords and where to find them - at NoRuKo
philnash
52
3.5k
Automating Front-end Workflow
addyosmani
1371
200k
Chrome DevTools: State of the Union 2024 - Debugging React & Beyond
addyosmani
9
1k
Documentation Writing (for coders)
carmenintech
76
5.2k
The Illustrated Children's Guide to Kubernetes
chrisshort
51
51k
Build your cross-platform service in a week with App Engine
jlugia
234
18k
ピンチをチャンスに:未来をつくるプロダクトロードマップ #pmconf2020
aki_iinuma
128
54k
CoffeeScript is Beautiful & I Never Want to Write Plain JavaScript Again
sstephenson
162
15k
Unsuck your backbone
ammeep
671
58k
Improving Core Web Vitals using Speculation Rules API
sergeychernyshev
21
1.3k
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