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
Sponsored
·
Ship Features Fearlessly
Turn features on and off without deploys. Used by thousands of Ruby developers.
→
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
680
Tech Culture in Startups
alexbeletsky
0
230
TDD in JavaScript
alexbeletsky
4
860
This is Node.js
alexbeletsky
10
450
Likeastore
alexbeletsky
3
140
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
620
Other Decks in Programming
See All in Programming
new(1.26) ← これすき / kamakura.go #8
utgwkk
0
1.6k
PostgreSQL を使った快適な go test 環境を求めて
otakakot
0
390
nuget-server - あなたが必要だったNuGetサーバー
kekyo
PRO
0
150
What Spring Developers Should Know About Jakarta EE
ivargrimstad
0
190
AI時代でも変わらない技術コミュニティの力~10年続く“ゆるい”つながりが生み出す価値
n_takehata
2
630
SourceGeneratorのマーカー属性問題について
htkym
0
140
Premier Disciplin for Micro Frontends Multi Version/ Framework Scenarios @OOP 2026, Munic
manfredsteyer
PRO
0
200
CSC307 Lecture 15
javiergs
PRO
0
220
AIコーディングの理想と現実 2026 | AI Coding: Expectations vs. Reality 2026
tomohisa
0
970
AI主導でFastAPIのWebサービスを作るときに 人間が構造化すべき境界線
okajun35
0
520
Rubyと楽しいをつくる / Creating joy with Ruby
chobishiba
0
200
社内規程RAGの精度を73.3% → 100%に改善した話
oharu121
13
7.5k
Featured
See All Featured
Improving Core Web Vitals using Speculation Rules API
sergeychernyshev
21
1.4k
Testing 201, or: Great Expectations
jmmastey
46
8.1k
The Illustrated Children's Guide to Kubernetes
chrisshort
51
52k
BBQ
matthewcrist
89
10k
Leveraging Curiosity to Care for An Aging Population
cassininazir
1
190
Helping Users Find Their Own Way: Creating Modern Search Experiences
danielanewman
31
3.1k
Designing for Timeless Needs
cassininazir
0
150
State of Search Keynote: SEO is Dead Long Live SEO
ryanjones
0
150
Jess Joyce - The Pitfalls of Following Frameworks
techseoconnect
PRO
1
94
Code Reviewing Like a Champion
maltzj
528
40k
Chasing Engaging Ingredients in Design
codingconduct
0
130
The Curse of the Amulet
leimatthew05
1
9.5k
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