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
My Tests are a Mess: The Other Junk Drawer
Search
Sponsored
·
Your Podcast. Everywhere. Effortlessly.
Share. Educate. Inspire. Entertain. You do you. We'll handle the rest.
→
Christopher Sexton
June 07, 2014
Technology
74
0
Share
My Tests are a Mess: The Other Junk Drawer
Slides from RubyNation
Christopher Sexton
June 07, 2014
More Decks by Christopher Sexton
See All by Christopher Sexton
Unraveling the Cable: How Action Cable Works
csexton
1
6.9k
Ruby's Killer Feature: The Community
csexton
0
95
Other Decks in Technology
See All in Technology
明日からドヤれる!超マニアックなAWSセキュリティTips10連発 / 10 Ultra-Niche AWS Security Tips
yuj1osm
0
510
扱える不確実性を増やしていく - スタートアップEMが考える「任せ方」
kadoppe
0
160
CloudSec JP #005 後締め ~ソフトウェアサプライチェーン攻撃から開発者のシークレットを守る~
lhazy
0
220
非エンジニア職からZOZOへ 〜登壇がキャリアに与えた影響〜
penpeen
0
490
レビューしきれない?それは「全て人力でのレビュー」だからではないでしょうか
amixedcolor
0
240
3つのボトルネックを解消し、リリースエンジニアリングを再定義した話
nealle
0
510
EBS暗号化に失敗してEC2が動かなくなった話
hamaguchimmm
1
140
#jawsugyokohama 100 LT11, "My AWS Journey 2011-2026 - kwntravel"
shinichirokawano
0
310
DIPS2.0データに基づく森林管理における無人航空機の利用状況
naokimuroki
1
220
CDK Insightsで見る、AIによるCDKコード静的解析(+AI解析)
k_adachi_01
2
170
インターネットの技術 / Internet technology
ks91
PRO
0
150
マルチエージェント × ハーネスエンジニアリング × GitLab Duo Agent Platformで実現する「AIエージェントに仕事をさせる時代へ。」 / 20260421 GitLab Duo Agent Platform
n11sh1
0
130
Featured
See All Featured
Odyssey Design
rkendrick25
PRO
2
570
How to Align SEO within the Product Triangle To Get Buy-In & Support - #RIMC
aleyda
1
1.5k
Reality Check: Gamification 10 Years Later
codingconduct
0
2.1k
Applied NLP in the Age of Generative AI
inesmontani
PRO
4
2.2k
The browser strikes back
jonoalderson
0
960
Music & Morning Musume
bryan
47
7.1k
Game over? The fight for quality and originality in the time of robots
wayneb77
1
160
Being A Developer After 40
akosma
91
590k
Digital Projects Gone Horribly Wrong (And the UX Pros Who Still Save the Day) - Dean Schuster
uxyall
0
1.1k
New Earth Scene 8
popppiees
3
2.1k
Art, The Web, and Tiny UX
lynnandtonic
304
21k
Skip the Path - Find Your Career Trail
mkilby
1
100
Transcript
None
None
None
The Other Junk Drawer
Long live TDD TDD is Dead
Thanks for your time! Any questions? $ rm -rf ./tests
Hi I am Aaron @cupakromer
Hi I am Chris @crsexton
None
And mess with the folks next door Let’s wake up
Like I did something super amazing On 3, say “woah”
This will really confuse them On 3, say “Moo”
I feel more awake That’s better
My Tests are a Mess
SRSLY How did it get this way?
10,000 ft
None
Goal
Write code that I can understand when I come back
to it in 6 months My Real Goal
Simple
The Plague It’s easy to build something complicated
Complicated vs. Complex
None
What to Test?
Acceptance Keep the business happy. Make things work.
Units Check all the bits and pieces
Units Sandi is a Wizard Magic Tricks of Testing bit.ly/sandi-wizard
In between Controllers Views Form Object Policies
Overlap Wait a second, that won’t work
None
Mise en Place Put your toys away as you go
Directory Structure mirror `/lib` (and `/app`)
Group Logically Put related things close together
Manage Setup Very carefully
Setup
Setup
Setup
Setup
Setup
Setup
Setup
Setup
Tests should help you understand what you need to test
(state) Class declarations tell you what behaviors you need to test
None
Priority
Intent
Habit
None
Awesome Tests “Bad” tests are 100% more awesome than no
tests
None
None
None
Pictures from TeeFury, Woot, Reddit, Disney, United Artists, Lucasfilm and
others. Images used under fair use. See Section 3.3: Use of Images for Peer Conferences of the Fair Use Guidelines for Digital Images http://copyright.lib.utexas.edu/imagguid.html Credits
Classic Arrange Act Assert
Arrange All the necessary preconditions and inputs
Act On the object or method under test
Assert That the expected results occurred