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
630
Tech Culture in Startups
alexbeletsky
0
200
TDD in JavaScript
alexbeletsky
4
840
This is Node.js
alexbeletsky
10
420
Likeastore
alexbeletsky
3
130
PaaS in your pocker with Dokku
alexbeletsky
7
2.5k
Building Single Page Applications
alexbeletsky
9
5.4k
.NET developer in JavaScript world
alexbeletsky
1
2.8k
Dynamic web development with Oak
alexbeletsky
1
600
Other Decks in Programming
See All in Programming
AIコーディングの本質は“コード“ではなく“構造“だった / The essence of AI coding is not “code” but "structure
seike460
PRO
2
700
コンポーネントライブラリで実現する、アクセシビリティの正しい実装パターン
schktjm
1
600
當開發遇上包裝:AI 如何讓產品從想法變成商品
clonn
0
270
Cloudflare Workersで進めるリモートMCP活用
syumai
13
1.9k
TypeScript製IaCツールのAWS CDKが様々な言語で実装できる理由 ~他言語変換の仕組み~ / cdk-language-transformation
gotok365
6
340
事業KPIを基に価値の解像度を上げる
nealle
0
180
AIにコードを生成するコードを作らせて、再現性を担保しよう! / Let AI generate code to ensure reproducibility
yamachu
7
5.8k
Perlで痩せる
yuukis
0
160
#QiitaBash TDDでAIに設計イメージを伝える
ryosukedtomita
2
1.4k
TypeScript エンジニアが Android 開発の世界に飛び込んだ話
yuisakamoto
6
840
Digging into the Matrix: Practicing Code Archaeology
arthurdoler
PRO
0
200
💎 My RubyKaigi Effect in 2025: Top Ruby Companies 🌐
yasulab
PRO
1
110
Featured
See All Featured
GraphQLとの向き合い方2022年版
quramy
46
14k
Design and Strategy: How to Deal with People Who Don’t "Get" Design
morganepeng
129
19k
JavaScript: Past, Present, and Future - NDC Porto 2020
reverentgeek
48
5.4k
Creating an realtime collaboration tool: Agile Flush - .NET Oxford
marcduiker
30
2.1k
RailsConf & Balkan Ruby 2019: The Past, Present, and Future of Rails at GitHub
eileencodes
137
34k
10 Git Anti Patterns You Should be Aware of
lemiorhan
PRO
656
60k
The Art of Delivering Value - GDevCon NA Keynote
reverentgeek
14
1.5k
Making Projects Easy
brettharned
116
6.2k
What's in a price? How to price your products and services
michaelherold
245
12k
[RailsConf 2023] Rails as a piece of cake
palkan
55
5.5k
Building Flexible Design Systems
yeseniaperezcruz
329
39k
Product Roadmaps are Hard
iamctodd
PRO
53
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