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
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
Microservices Platforms: When Team Topologies Meets Microservices Patterns
cer
PRO
0
230
[堅牢.py #1] テストを書かない研究者に送る、最初にテストを書く実験コード入門 / Let's start your ML project by writing tests
shunk031
11
5.6k
生成AIを活用したリファクタリング実践 ~コードスメルをなくすためのアプローチ
raedion
0
110
Flutterアプリ運用の現場で役立った監視Tips 5選
ostk0069
1
500
社内オペレーション改善のためのTypeScript / TSKaigi Hokuriku 2025
dachi023
1
120
「文字列→日付」の落とし穴 〜Ruby Date.parseの意外な挙動〜
sg4k0
0
210
Chart.jsで長い項目を表示するときのハマりどころ
yumechi
0
150
TypeScriptで設計する 堅牢さとUXを両立した非同期ワークフローの実現
moeka__c
2
1.9k
Querying Design System デザインシステムの意思決定を支える構造検索
ikumatadokoro
1
1.2k
知られているようで知られていない JavaScriptの仕様 4選
syumai
0
630
Feature Flags Suck! - KubeCon Atlanta 2025
phodgson
0
150
手軽に積ん読を増やすには?/読みたい本と付き合うには?
o0h
PRO
1
110
Featured
See All Featured
CoffeeScript is Beautiful & I Never Want to Write Plain JavaScript Again
sstephenson
162
15k
Principles of Awesome APIs and How to Build Them.
keavy
127
17k
Design and Strategy: How to Deal with People Who Don’t "Get" Design
morganepeng
132
19k
Code Review Best Practice
trishagee
72
19k
Dealing with People You Can't Stand - Big Design 2015
cassininazir
367
27k
Building Applications with DynamoDB
mza
96
6.8k
Become a Pro
speakerdeck
PRO
29
5.6k
Responsive Adventures: Dirty Tricks From The Dark Corners of Front-End
smashingmag
253
22k
Helping Users Find Their Own Way: Creating Modern Search Experiences
danielanewman
31
3k
How to train your dragon (web standard)
notwaldorf
97
6.4k
Creating an realtime collaboration tool: Agile Flush - .NET Oxford
marcduiker
34
2.3k
Stop Working from a Prison Cell
hatefulcrawdad
272
21k
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