Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Sign up for free
Menu
Search
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Pricing
Search
Sign in
Sign up for free
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
360
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
270
TDD in JavaScript
alexbeletsky
4
870
This is Node.js
alexbeletsky
10
480
Likeastore
alexbeletsky
3
190
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
660
Other Decks in Programming
See All in Programming
Streamlitで実現する自然言語データアプリ開発
ayumu_yamaguchi
1
290
Omarchy Tokyo やると聞いて UMPC 買ってセットアップしてきた
mtsmfm
0
150
JPUG勉強会 OSSデータベースの内部構造を理解しよう(第2回)
oga5
0
260
XP祭りでしか伝わらないフリップネタ #xpjug
murabayashi
0
150
世界の中心で、AI(App Intents)をさけぶ ー App Intents中心設計の実践ガイド
touyou
0
610
WebMCP Challenge に星空観察アプリで参加した話
okajun35
0
180
標準パッケージに uuid が追加された 背景から見る Go らしい意思決定 / go_127_uuid_decision
convto
5
7.5k
フロントエンドUIフレームワークのこれまでとこれから
ssssota
5
2.8k
Security issues being discussed on Web Platforms
petamoriken
0
980
AgentCore CLI で進化した AWS での AI エージェントの作り方 : 必要な機能を必要な時に
icoxfog417
PRO
3
360
速く作れる。その次は、速く確かめられる開発へ 〜AIネイティブ開発を支える、Shift Down〜 / Can build fast. Next, moving to development where we can verify fast.
rkaga
5
3.4k
Are APIs Still Relevant in the AI Era?
soyuka
0
270
Featured
See All Featured
Redefining SEO in the New Era of Traffic Generation
szymonslowik
1
420
Chrome DevTools: State of the Union 2024 - Debugging React & Beyond
addyosmani
10
1.3k
CSS Pre-Processors: Stylus, Less & Sass
bermonpainter
360
30k
Rails Girls Zürich Keynote
gr2m
96
14k
The #1 spot is gone: here's how to win anyway
tamaranovitovic
4
1.2k
Dealing with People You Can't Stand - Big Design 2015
cassininazir
367
27k
Easily Structure & Communicate Ideas using Wireframe
afnizarnur
194
17k
Mobile First: as difficult as doing things right
swwweet
225
10k
Claude Code のすすめ
schroneko
67
230k
The B2B funnel & how to create a winning content strategy
katarinadahlin
PRO
1
530
Typedesign – Prime Four
hannesfritz
42
3.2k
Making Projects Easy
brettharned
120
6.8k
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