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
720
Tech Culture in Startups
alexbeletsky
0
260
TDD in JavaScript
alexbeletsky
4
870
This is Node.js
alexbeletsky
10
470
Likeastore
alexbeletsky
3
180
PaaS in your pocker with Dokku
alexbeletsky
7
2.7k
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
PostgreSQL 18で考えるUUID主キー
kazuhiro1982
0
470
琵琶湖の水は止められてもNet--HTTPのリトライは止められない / You might be able to stop the water flow of Lake Biwa but you can't stop Net::HTTP retries
luccafort
PRO
0
710
プロポーザルを書いてもらう
pvcresin
0
510
わからない話を追いかけたら、プログラミング言語を作る側にいた
ydah
3
500
生成AIで帳票OCRが「簡単に」作れる時代になった?
kon_shou
0
890
「寝てても仕事が進む」Claude Codeで組む第二の脳
tomoyafujita2016
0
330
TSX の <Hoge<Fuga>> という構文に驚いた話 / tsx-type-argument-syntax
kanaru0928
0
230
関東Kaggler会_NVIDIA_Nemotron_コンペ_振り返り
rick_ds
0
570
楽しそうなつよつよエンジニアと目が死んでる僕/A brilliant engineer having a blast, and dead-eyed me.
3l4l5
2
180
改善しないと、タスクが回らない。 “てんこ盛りポジション” を引き継いだ情シスの、入社3ヶ月の業務改善録
krm963
0
260
jsmini JavaScript Engine を作ってみた話
yosuke_furukawa
PRO
0
320
Laravel Boostに学ぶ、AIにPHPを書かせる技術 〜OSSの実装から蒸留するエージェント制御の王道〜
kentaroutakeda
3
690
Featured
See All Featured
How to Talk to Developers About Accessibility
jct
2
510
Claude Code のすすめ
schroneko
67
230k
Abbi's Birthday
coloredviolet
3
9.3k
Practical Orchestrator
shlominoach
191
12k
Leveraging Curiosity to Care for An Aging Population
cassininazir
1
470
Joys of Absence: A Defence of Solitary Play
codingconduct
1
430
Discover your Explorer Soul
emna__ayadi
2
1.3k
16th Malabo Montpellier Forum Presentation
akademiya2063
PRO
0
350
Site-Speed That Sticks
csswizardry
13
1.4k
Intergalactic Javascript Robots from Outer Space
tanoku
273
27k
First, design no harm
axbom
PRO
2
1.2k
ピンチをチャンスに:未来をつくるプロダクトロードマップ #pmconf2020
aki_iinuma
128
56k
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