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
260
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
570
Tech Culture in Startups
alexbeletsky
0
170
TDD in JavaScript
alexbeletsky
4
830
This is Node.js
alexbeletsky
10
390
Likeastore
alexbeletsky
3
120
PaaS in your pocker with Dokku
alexbeletsky
7
2.4k
Building Single Page Applications
alexbeletsky
9
5.3k
.NET developer in JavaScript world
alexbeletsky
1
2.7k
Dynamic web development with Oak
alexbeletsky
1
570
Other Decks in Programming
See All in Programming
tsconfig.jsonの最近の新機能 ファイルパス編
uhyo
6
1.4k
App Router 悲喜交々
quramy
7
370
Unlocking Python's Core Magic
leew
0
110
ACES Meet におけるリリース作業改善の取り組み
fukucheee
0
120
"型"のあるRailsアプリケーション開発 / Typed Rails application development
sinsoku
8
2.2k
AWS認定資格を受験するにあたり、気づいたこと・実践していたことのまとめ
satoshi256kbyte
1
120
[PHPカンファレンス沖縄2024]「無理なくできるだけ安全に」テストもないレガシーコードをリファクタリングするテクニック
ikezoemakoto
3
110
標準ライブラリの動向とイテレータのパフォーマンス
makki_d
3
190
実践Dash - 手を抜きながら本気で作るデータApplicationの基本と応用 / Dash for Python and Baseball
shinyorke
2
230
Remix × Cloudflare Pages × Sentry 奮闘記 / remix-pages-sentry
nkzn
1
370
学生の時に開催したPerl入学式をきっかけにエンジニアが組織に馴染むために勉強会を主催や仲間と参加して職能間の境界を越えていく
ohmori_yusuke
1
110
The Efficiency Paradox and How to Save Yourself and the World
hollycummins
0
140
Featured
See All Featured
Fantastic passwords and where to find them - at NoRuKo
philnash
50
2.8k
Statistics for Hackers
jakevdp
796
220k
Teambox: Starting and Learning
jrom
131
8.7k
Being A Developer After 40
akosma
84
590k
The Psychology of Web Performance [Beyond Tellerrand 2023]
tammyeverts
38
2.1k
Done Done
chrislema
181
16k
Code Review Best Practice
trishagee
62
16k
Debugging Ruby Performance
tmm1
73
12k
The Myth of the Modular Monolith - Day 2 Keynote - Rails World 2024
eileencodes
6
230
KATA
mclloyd
27
13k
Bash Introduction
62gerente
608
210k
What's in a price? How to price your products and services
michaelherold
243
11k
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