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
280
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
610
Tech Culture in Startups
alexbeletsky
0
180
TDD in JavaScript
alexbeletsky
4
830
This is Node.js
alexbeletsky
10
400
Likeastore
alexbeletsky
3
120
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.7k
Dynamic web development with Oak
alexbeletsky
1
580
Other Decks in Programming
See All in Programming
Domain-Driven Transformation
hschwentner
2
1.9k
Grafana Loki によるサーバログのコスト削減
mot_techtalk
1
110
『品質』という言葉が嫌いな理由
korimu
0
160
個人アプリを2年ぶりにアプデしたから褒めて / I just updated my personal app, praise me!
lovee
0
340
DevinとCursorから学ぶAIエージェントメモリーの設計とMoatの考え方
itarutomy
1
640
最近のVS Codeで気になるニュース 2025/01
74th
1
250
Honoのおもしろいミドルウェアをみてみよう
yusukebe
1
200
なぜイベント駆動が必要なのか - CQRS/ESで解く複雑系システムの課題 -
j5ik2o
7
2.5k
Rails アプリ地図考 Flush Cut
makicamel
1
110
2024年のWebフロントエンドのふりかえりと2025年
sakito
1
230
AWS Organizations で実現する、 マルチ AWS アカウントのルートユーザー管理からの脱却
atpons
0
130
Software Architecture
hschwentner
6
2.1k
Featured
See All Featured
Being A Developer After 40
akosma
89
590k
10 Git Anti Patterns You Should be Aware of
lemiorhan
PRO
656
59k
The Psychology of Web Performance [Beyond Tellerrand 2023]
tammyeverts
45
2.3k
Rails Girls Zürich Keynote
gr2m
94
13k
Product Roadmaps are Hard
iamctodd
PRO
50
11k
Building an army of robots
kneath
302
45k
Faster Mobile Websites
deanohume
306
31k
XXLCSS - How to scale CSS and keep your sanity
sugarenia
248
1.3M
Let's Do A Bunch of Simple Stuff to Make Websites Faster
chriscoyier
507
140k
Adopting Sorbet at Scale
ufuk
74
9.2k
RailsConf & Balkan Ruby 2019: The Past, Present, and Future of Rails at GitHub
eileencodes
132
33k
Sharpening the Axe: The Primacy of Toolmaking
bcantrill
40
2k
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