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
9 ways to test your spaghetti code
Search
Mads Opheim
May 30, 2019
Technology
53
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
9 ways to test your spaghetti code
From Nordic Testing Days 2019
Mads Opheim
May 30, 2019
More Decks by Mads Opheim
See All by Mads Opheim
Modern Java App Development in the Cloud
madsopheim
0
62
IoT Powered by MicroProfile - JFuture
madsopheim
0
620
IoT Powered by MicroProfile - MakeIT
madsopheim
0
45
IoT powered by MicroProfile
madsopheim
0
48
9 ways to test your spaghetti code
madsopheim
0
140
Domain driven design in the real world
madsopheim
0
420
Make your tests tell the story of your domain
madsopheim
0
100
IoT powered by MicroProfile
madsopheim
0
59
9_ways_to_test_your_spaghetti_code_-_Devoxx_Ukraine.pdf
madsopheim
0
73
Other Decks in Technology
See All in Technology
Keeping applications secure by evolving OAuth 2.0 and OpenID Connect
ahus1
PRO
1
150
Zoom2Youtube.Claude
kawaguti
PRO
2
450
キャリアの中で本を作る / Making a Book During Your Career
ak1210
0
100
SRE Lounge Hiroshimaへの招待
grimoh
0
340
LiDAR SLAMの実装とセンサ融合 ~Lie群からContinuous-Time LIOまで~
naokiakai
1
990
人を動かすのは時間ではなく、納得感 〜新任EMが入社3ヶ月、組織を2回変えた話〜
kakehashi
PRO
2
120
product engineering with qa
nealle
0
150
AWS Blocks を触ってみた/first-tach-aws-blocks
fossamagna
2
150
そのタスクオンスケですか?
poropinai1966
0
140
スタートアップにおけるアジャイルの実践について #shibuyagile
murabayashi
3
2.1k
アカウントが増えてからでは遅い? ~ マルチアカウント統制の勘所 ~
kenichinakamura
0
160
プライバシー保護の理論と実践
lycorptech_jp
PRO
1
240
Featured
See All Featured
Lightning talk: Run Django tests with GitHub Actions
sabderemane
0
220
Speed Design
sergeychernyshev
33
1.9k
Java REST API Framework Comparison - PWX 2021
mraible
34
9.4k
Joys of Absence: A Defence of Solitary Play
codingconduct
1
410
HU Berlin: Industrial-Strength Natural Language Processing with spaCy and Prodigy
inesmontani
PRO
0
440
A brief & incomplete history of UX Design for the World Wide Web: 1989–2019
jct
2
410
Prompt Engineering for Job Search
mfonobong
0
370
Designing for Performance
lara
611
70k
ReactJS: Keep Simple. Everything can be a component!
pedronauck
666
130k
Why Mistakes Are the Best Teachers: Turning Failure into a Pathway for Growth
auna
0
180
AI in Enterprises - Java and Open Source to the Rescue
ivargrimstad
0
1.4k
Reality Check: Gamification 10 Years Later
codingconduct
0
2.2k
Transcript
Nordic Testing Days 9 ways to test your spaghetti code
Mads Opheim @MadsOpheim 1
Tere! I’m Mads. I’m a developer 2
Spaghetti code? 3
The 9 ways 4
5 1. Test all or Test small
6 2. Set your dependencies
7
Singletons 8
3. Package-protect problematic parts 9
Tools for your toolbox 10
4. Do simple refactorings to get your code under test
11
In general: untangling and looking at one part at a
time 12
You’re not as smart as you think you are 13
Well-designed code is testable code 14
15 5. Help your team
You’ll forget things 16
6. Run your tests - and care 17
7. Feature toggles 18
8. One mile at a time 19
Refactor in separate commits 20
9. Test-driven development 21
Test-driven spaghetti 22
TDD on legacy code in practice 23
Tip 10, 11 and onwards 24
25 The Deadline For Kunngjøring Is Four Weeks()
26 Properties For Namsmann Mainly Follow The Same Rules as
Hovedstevnevitne()
You’ll do stupid things - and that’s ok 27
Be consistent 28
Give me more @lisacrispin, @lisihocke, @techgirl1908, @maaretp... 29
Key takeaways 30 1. Good code design improves testability 2.
TDD on spaghetti code: TDD + test spaghetti code 3. Write tests for you legacy code - you can do it!
Thank you! @MadsOpheim
[email protected]
31