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
290
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
一休.com のログイン体験を支える技術 〜Web Components x Vue.js 活用事例と最適化について〜
atsumim
0
660
Amazon ECS とマイクロサービスから考えるシステム構成
hiyanger
2
580
AIの力でお手軽Chrome拡張機能作り
taiseiue
0
180
How mixi2 Uses TiDB for SNS Scalability and Performance
kanmo
40
15k
React 19アップデートのために必要なこと
uhyo
2
660
.NET Frameworkでも汎用ホストが使いたい!
tomokusaba
0
170
『GO』アプリ バックエンドサーバのコスト削減
mot_techtalk
0
150
Lottieアニメーションをカスタマイズしてみた
tahia910
0
130
Grafana Cloudとソラカメ
devoc
0
180
バックエンドのためのアプリ内課金入門 (サブスク編)
qnighy
8
1.8k
Domain-Driven Transformation
hschwentner
2
1.9k
Honoとフロントエンドの 型安全性について
yodaka
7
1.4k
Featured
See All Featured
Designing for Performance
lara
604
68k
Six Lessons from altMBA
skipperchong
27
3.6k
Java REST API Framework Comparison - PWX 2021
mraible
28
8.4k
jQuery: Nuts, Bolts and Bling
dougneiner
63
7.6k
The Power of CSS Pseudo Elements
geoffreycrofte
75
5.5k
Automating Front-end Workflow
addyosmani
1368
200k
How STYLIGHT went responsive
nonsquared
98
5.4k
Stop Working from a Prison Cell
hatefulcrawdad
267
20k
CSS Pre-Processors: Stylus, Less & Sass
bermonpainter
356
29k
Gamification - CAS2011
davidbonilla
80
5.1k
Build The Right Thing And Hit Your Dates
maggiecrowley
34
2.5k
Git: the NoSQL Database
bkeepers
PRO
427
64k
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