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
300
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
620
Tech Culture in Startups
alexbeletsky
0
190
TDD in JavaScript
alexbeletsky
4
840
This is Node.js
alexbeletsky
10
410
Likeastore
alexbeletsky
3
130
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.8k
Dynamic web development with Oak
alexbeletsky
1
590
Other Decks in Programming
See All in Programming
Optimizing JRuby 10
headius
0
400
リアルタイムレイトレーシング + ニューラルレンダリング簡単紹介 / Real-Time Ray Tracing & Neural Rendering: A Quick Introduction (2025)
shocker_0x15
1
310
Memory API : Patterns, Performance et Cas d'Utilisation
josepaumard
0
140
[NG India] Event-Based State Management with NgRx SignalStore
markostanimirovic
1
160
gen_statem - OTP's Unsung Hero
whatyouhide
1
210
監視 やばい
syossan27
11
9.8k
MCP調べてみました! / Exploring MCP
uhzz
2
2.3k
「”誤った使い方をすることが困難”な設計」で良いコードの基礎を固めよう / phpcon-odawara-2025
taniguhey
0
160
Enterprise Web App. Development (1): Build Tool Training Ver. 5
knakagawa
1
120
Thank you <💅>, What's the Next?
ahoxa
1
490
エンジニアが挑む、限界までの越境
nealle
1
250
これだけは知っておきたいクラス設計の基礎知識 version 2
masuda220
PRO
24
6.5k
Featured
See All Featured
[Rails World 2023 - Day 1 Closing Keynote] - The Magic of Rails
eileencodes
34
2.2k
A Modern Web Designer's Workflow
chriscoyier
693
190k
Into the Great Unknown - MozCon
thekraken
37
1.7k
Measuring & Analyzing Core Web Vitals
bluesmoon
7
390
Java REST API Framework Comparison - PWX 2021
mraible
30
8.5k
How to Ace a Technical Interview
jacobian
276
23k
Dealing with People You Can't Stand - Big Design 2015
cassininazir
367
26k
Code Review Best Practice
trishagee
67
18k
Bootstrapping a Software Product
garrettdimon
PRO
307
110k
Building Applications with DynamoDB
mza
94
6.3k
Raft: Consensus for Rubyists
vanstee
137
6.9k
Documentation Writing (for coders)
carmenintech
69
4.7k
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