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
Sponsored
·
Ship Features Fearlessly
Turn features on and off without deploys. Used by thousands of Ruby developers.
→
Alexander Beletsky
April 12, 2013
Programming
2
320
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
680
Tech Culture in Startups
alexbeletsky
0
230
TDD in JavaScript
alexbeletsky
4
850
This is Node.js
alexbeletsky
10
440
Likeastore
alexbeletsky
3
140
PaaS in your pocker with Dokku
alexbeletsky
7
2.6k
Building Single Page Applications
alexbeletsky
9
5.4k
.NET developer in JavaScript world
alexbeletsky
1
2.9k
Dynamic web development with Oak
alexbeletsky
1
620
Other Decks in Programming
See All in Programming
AI巻き込み型コードレビューのススメ
nealle
1
170
Implementation Patterns
denyspoltorak
0
280
AIエージェント、”どう作るか”で差は出るか? / AI Agents: Does the "How" Make a Difference?
rkaga
4
2k
AIによる開発の民主化を支える コンテキスト管理のこれまでとこれから
mulyu
3
250
Honoを使ったリモートMCPサーバでAIツールとの連携を加速させる!
tosuri13
1
180
MDN Web Docs に日本語翻訳でコントリビュート
ohmori_yusuke
0
650
OSSとなったswift-buildで Xcodeのビルドを差し替えられるため 自分でXcodeを直せる時代になっている ダイアモンド問題編
yimajo
3
610
IFSによる形状設計/デモシーンの魅力 @ 慶應大学SFC
gam0022
1
300
MUSUBIXとは
nahisaho
0
130
Oxlintはいいぞ
yug1224
5
1.3k
ThorVG Viewer In VS Code
nors
0
770
16年目のピクシブ百科事典を支える最新の技術基盤 / The Modern Tech Stack Powering Pixiv Encyclopedia in its 16th Year
ahuglajbclajep
5
1k
Featured
See All Featured
[RailsConf 2023 Opening Keynote] The Magic of Rails
eileencodes
31
9.9k
Side Projects
sachag
455
43k
Creating an realtime collaboration tool: Agile Flush - .NET Oxford
marcduiker
35
2.4k
Agile that works and the tools we love
rasmusluckow
331
21k
We Are The Robots
honzajavorek
0
160
Deep Space Network (abreviated)
tonyrice
0
47
B2B Lead Gen: Tactics, Traps & Triumph
marketingsoph
0
53
Claude Code どこまでも/ Claude Code Everywhere
nwiizo
61
52k
Introduction to Domain-Driven Design and Collaborative software design
baasie
1
580
Organizational Design Perspectives: An Ontology of Organizational Design Elements
kimpetersen
PRO
1
190
The World Runs on Bad Software
bkeepers
PRO
72
12k
Writing Fast Ruby
sferik
630
62k
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