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
250
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
520
Tech Culture in Startups
alexbeletsky
0
150
TDD in JavaScript
alexbeletsky
4
830
This is Node.js
alexbeletsky
10
370
Likeastore
alexbeletsky
3
120
PaaS in your pocker with Dokku
alexbeletsky
7
2.3k
Building Single Page Applications
alexbeletsky
9
5.2k
.NET developer in JavaScript world
alexbeletsky
1
2.6k
Dynamic web development with Oak
alexbeletsky
1
570
Other Decks in Programming
See All in Programming
MetricKitで予期せぬ終了を検知する話 / Detect unexpected termination with MetricKit
nekowen
1
180
educure_カリキュラム生操作マニュアル.pdf
linew_official
0
760
Anthropic Cookbook のおすすめレシピ
schroneko
7
930
サイコロで理解する統計的仮説検定の考え方
tatamiya
4
930
今、知っておきたい! 生成AIエージェントの世界
elith
3
350
Micro Frontends for Java Microservices - Devnexus 2024
mraible
PRO
0
490
SIMD Parallel Programming with the Vector API
josepaumard
0
160
1BRC--Nerd Sniping the Java Community
gunnarmorling
0
340
Zero Waste, Radical Magic, and Italian Graft – Quarkus Efficiency Secrets
hollycummins
0
230
Ruby Pattern Matching
bkuhlmann
0
930
Code Reviews
bkuhlmann
4
890
Kotlin Multiplatform at Stable and Beyond (Android Makers 2024)
zsmb
0
120
Featured
See All Featured
Facilitating Awesome Meetings
lara
42
5.6k
How to name files
jennybc
65
93k
Distributed Sagas: A Protocol for Coordinating Microservices
caitiem20
322
20k
Reflections from 52 weeks, 52 projects
jeffersonlam
345
19k
Building Better People: How to give real-time feedback that sticks.
wjessup
355
18k
[RailsConf 2023] Rails as a piece of cake
palkan
23
3.9k
10 Git Anti Patterns You Should be Aware of
lemiorhan
648
58k
A designer walks into a library…
pauljervisheath
200
23k
A Modern Web Designer's Workflow
chriscoyier
689
190k
Visualizing Your Data: Incorporating Mongo into Loggly Infrastructure
mongodb
34
8.9k
ピンチをチャンスに:未来をつくるプロダクトロードマップ #pmconf2020
aki_iinuma
78
42k
Easily Structure & Communicate Ideas using Wireframe
afnizarnur
187
16k
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