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
550
Tech Culture in Startups
alexbeletsky
0
160
TDD in JavaScript
alexbeletsky
4
830
This is Node.js
alexbeletsky
10
380
Likeastore
alexbeletsky
3
120
PaaS in your pocker with Dokku
alexbeletsky
7
2.4k
Building Single Page Applications
alexbeletsky
9
5.2k
.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
継続的な活動で築く地方エンジニアの道
myamashii
2
350
Android開発者のための Kotlin Multiplatform入門
ntaro
0
190
Findy - エンジニア向け会社紹介 / Findy Letter for Engineers
findyinc
2
81k
リハビリmruby
kishima
1
160
AWS初心者ってどうやってAWSを学ぶ?〜アプリエンジニアがやってよかったアーキテクチャ学習方法〜
yamanashi_ren01
0
190
しくじり先生 Image Matching Challenge 2024 編
goosehaaan
0
810
Polarsの成長: v0.14からv1.0までの変遷と今後の展望
zerebom
1
350
12年前の『型システム入門』翻訳の思い出話
mame
11
1.2k
Activities at Cairo Library
cairolibrary720
0
1.2k
AWS CDKにおける「再利用性」を考える / aws-cdk-reusability
gotok365
6
1.3k
Clean Architecture by TypeScript & NestJS
ryounasso
0
150
SDCon2024: Enabling DevOps and Team Topologies thru architecture: architecting for fast flow
cer
PRO
0
780
Featured
See All Featured
Speed Design
sergeychernyshev
9
270
How GitHub (no longer) Works
holman
305
140k
Designing the Hi-DPI Web
ddemaree
276
34k
I Don’t Have Time: Getting Over the Fear to Launch Your Podcast
jcasabona
26
1.8k
Raft: Consensus for Rubyists
vanstee
134
6.5k
A better future with KSS
kneath
231
17k
Responsive Adventures: Dirty Tricks From The Dark Corners of Front-End
smashingmag
248
20k
Building Flexible Design Systems
yeseniaperezcruz
323
37k
Gamification - CAS2011
davidbonilla
78
4.9k
Documentation Writing (for coders)
carmenintech
63
4.2k
Statistics for Hackers
jakevdp
792
220k
Keith and Marios Guide to Fast Websites
keithpitt
408
22k
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