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
270
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
590
Tech Culture in Startups
alexbeletsky
0
180
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
580
Other Decks in Programming
See All in Programming
Асинхронность неизбежна: как мы проектировали сервис уведомлений
lamodatech
0
890
Итераторы в Go 1.23: зачем они нужны, как использовать, и насколько они быстрые?
lamodatech
0
890
Scalaから始めるOpenFeature入門 / Scalaわいわい勉強会 #4
arthur1
1
340
Spatial Rendering for Apple Vision Pro
warrenm
0
120
生成AIでGitHubソースコード取得して仕様書を作成
shukob
0
500
useSyncExternalStoreを使いまくる
ssssota
6
1.3k
責務を分離するための例外設計 - PHPカンファレンス 2024
kajitack
8
1.8k
htmxって知っていますか?次世代のHTML
hiro_ghap1
0
350
Fibonacci Function Gallery - Part 1
philipschwarz
PRO
0
220
Recoilを剥がしている話
kirik
5
6.9k
ゆるやかにgolangci-lintのルールを強くする / Kyoto.go #56
utgwkk
2
420
テストコードのガイドライン 〜作成から運用まで〜
riku929hr
5
840
Featured
See All Featured
Understanding Cognitive Biases in Performance Measurement
bluesmoon
26
1.5k
[Rails World 2023 - Day 1 Closing Keynote] - The Magic of Rails
eileencodes
33
2k
Principles of Awesome APIs and How to Build Them.
keavy
126
17k
Site-Speed That Sticks
csswizardry
2
190
The Cost Of JavaScript in 2023
addyosmani
46
7k
A designer walks into a library…
pauljervisheath
205
24k
Visualizing Your Data: Incorporating Mongo into Loggly Infrastructure
mongodb
44
9.3k
How STYLIGHT went responsive
nonsquared
96
5.2k
Writing Fast Ruby
sferik
628
61k
We Have a Design System, Now What?
morganepeng
51
7.3k
Chrome DevTools: State of the Union 2024 - Debugging React & Beyond
addyosmani
3
170
Done Done
chrislema
182
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