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
GAEログのコスト削減
mot_techtalk
0
120
PRレビューのお供にDanger
stoticdev
1
210
Datadog DBMでなにができる? JDDUG Meetup#7
nealle
0
100
JavaScriptツール群「UnJS」を5分で一気に駆け巡る!
k1tikurisu
9
1.8k
Visual StudioのGitHub Copilotでいろいろやってみる
tomokusaba
1
180
CloudNativePGを布教したい
nnaka2992
0
100
color-scheme: light dark; を完全に理解する
uhyo
7
470
Conform を推す - Advocating for Conform
mizoguchicoji
3
700
GoとPHPのインターフェイスの違い
shimabox
2
200
Honoをフロントエンドで使う 3つのやり方
yusukebe
7
3.4k
Grafana Cloudとソラカメ
devoc
0
180
AIの力でお手軽Chrome拡張機能作り
taiseiue
0
180
Featured
See All Featured
Side Projects
sachag
452
42k
Producing Creativity
orderedlist
PRO
344
39k
A Philosophy of Restraint
colly
203
16k
The MySQL Ecosystem @ GitHub 2015
samlambert
250
12k
Music & Morning Musume
bryan
46
6.4k
Why Our Code Smells
bkeepers
PRO
336
57k
Optimising Largest Contentful Paint
csswizardry
34
3.1k
Measuring & Analyzing Core Web Vitals
bluesmoon
6
250
[RailsConf 2023] Rails as a piece of cake
palkan
53
5.3k
Easily Structure & Communicate Ideas using Wireframe
afnizarnur
193
16k
Rails Girls Zürich Keynote
gr2m
94
13k
BBQ
matthewcrist
87
9.5k
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