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
310
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
660
Tech Culture in Startups
alexbeletsky
0
210
TDD in JavaScript
alexbeletsky
4
840
This is Node.js
alexbeletsky
10
430
Likeastore
alexbeletsky
3
130
PaaS in your pocker with Dokku
alexbeletsky
7
2.5k
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
AI時代のUIはどこへ行く?
yusukebe
18
9.1k
テストコードはもう書かない:JetBrains AI Assistantに委ねる非同期処理のテスト自動設計・生成
makun
0
530
Deep Dive into Kotlin Flow
jmatsu
1
370
print("Hello, World")
eddie
2
530
奥深くて厄介な「改行」と仲良くなる20分
oguemon
1
560
複雑なフォームに立ち向かう Next.js の技術選定
macchiitaka
2
220
FindyにおけるTakumi活用と脆弱性管理のこれから
rvirus0817
0
540
AWS発のAIエディタKiroを使ってみた
iriikeita
1
190
Navigating Dependency Injection with Metro
zacsweers
3
2.5k
Cache Me If You Can
ryunen344
2
3.1k
AIと私たちの学習の変化を考える - Claude Codeの学習モードを例に
azukiazusa1
11
4.4k
Design Foundational Data Engineering Observability
sucitw
3
200
Featured
See All Featured
10 Git Anti Patterns You Should be Aware of
lemiorhan
PRO
656
61k
The Psychology of Web Performance [Beyond Tellerrand 2023]
tammyeverts
49
3k
How to Ace a Technical Interview
jacobian
279
23k
Improving Core Web Vitals using Speculation Rules API
sergeychernyshev
18
1.1k
jQuery: Nuts, Bolts and Bling
dougneiner
64
7.9k
GitHub's CSS Performance
jonrohan
1032
460k
4 Signs Your Business is Dying
shpigford
184
22k
No one is an island. Learnings from fostering a developers community.
thoeni
21
3.4k
ReactJS: Keep Simple. Everything can be a component!
pedronauck
667
120k
Building a Scalable Design System with Sketch
lauravandoore
462
33k
Why Our Code Smells
bkeepers
PRO
339
57k
Designing Experiences People Love
moore
142
24k
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