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
350
2
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
How to write good tests?
Small talk that I gave to @debitoor guys about practices of writing tests.
Alexander Beletsky
April 12, 2013
More Decks by Alexander Beletsky
See All by Alexander Beletsky
Snapshot Testing: Going beyond UI
alexbeletsky
1
710
Tech Culture in Startups
alexbeletsky
0
260
TDD in JavaScript
alexbeletsky
4
860
This is Node.js
alexbeletsky
10
470
Likeastore
alexbeletsky
3
170
PaaS in your pocker with Dokku
alexbeletsky
7
2.6k
Building Single Page Applications
alexbeletsky
9
5.5k
.NET developer in JavaScript world
alexbeletsky
1
2.9k
Dynamic web development with Oak
alexbeletsky
1
650
Other Decks in Programming
See All in Programming
共通化で考えるべきは、実装より公開する型だった
codeegg
0
270
Laravelで学ぶ Webアプリケーションチューニング入門/web_application_tuning_101
hanhan1978
4
1.3k
AIが無かった頃の素敵な出会いの話
codmoninc
1
210
Built Our Own Background Agent at LayerX #aidevex_findy
layerx
PRO
8
3.1k
act2-costs.pdf
sumedhbala
0
120
AIキャラアプリkaiwaの低遅延音声通話基盤をどう作ったか - AWS Gravitonで支える低遅延・低コストAI Agent基盤
mogamit
0
180
광주소프트웨어마이스터고등학교 DevFest 특강 - 바이브 코딩 시대에서 주니어 개발자로 살아남는 방법
utilforever
1
150
PHP に部分適用が来るぞ!……ところで何それ?おいしいの? #phpcon / phpcon-2026
shogogg
0
340
えっ!!コードを読まずに開発を!?
hananouchi
0
230
What's New in Android 2026
veronikapj
0
150
才能?センス?知らん、 続けたもん勝ちだ。-- 結婚・出産・癌を越えてなお、私がプロダクトを創り続ける理由
16bitidol
2
900
霧の中の代数的エフェクト
funnyycat
1
420
Featured
See All Featured
Ten Tips & Tricks for a 🌱 transition
stuffmc
0
150
Navigating Team Friction
lara
192
16k
Creating an realtime collaboration tool: Agile Flush - .NET Oxford
marcduiker
35
2.5k
Code Reviewing Like a Champion
maltzj
528
40k
We Have a Design System, Now What?
morganepeng
55
8.2k
We Are The Robots
honzajavorek
0
280
Optimizing for Happiness
mojombo
378
71k
16th Malabo Montpellier Forum Presentation
akademiya2063
PRO
0
280
Conquering PDFs: document understanding beyond plain text
inesmontani
PRO
4
2.9k
How to Talk to Developers About Accessibility
jct
2
430
AI in Enterprises - Java and Open Source to the Rescue
ivargrimstad
0
1.4k
Navigating Weather and Climate Data
rabernat
0
400
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