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
TDD für Senior-Devs
Search
Oliver Klee
May 30, 2023
Programming
0
120
TDD für Senior-Devs
Oliver Klee
May 30, 2023
Tweet
Share
More Decks by Oliver Klee
See All by Oliver Klee
Gewaltfreie Kommunikation: ein Crashkurs
oliverklee
0
37
Team-Management-Plattform
oliverklee
0
58
Vertrauen in Teams & Führung
oliverklee
0
220
Software-Qualität von TYPO3-Extensions automatisieren
oliverklee
0
31
Vertrauen in Teams & Führung
oliverklee
0
140
Testing von TYPO3-Extensions
oliverklee
0
56
Software-Qualität von Extensions automatisieren
oliverklee
1
45
Content-Synchronisierung
oliverklee
0
140
Gewaltfreie Kommunikation: ein Crashkurs
oliverklee
0
300
Other Decks in Programming
See All in Programming
TFLintカスタムプラグインで始める Terraformコード品質管理
bells17
2
210
Introduce Hono CLI
yusukebe
6
2.8k
Goで実践するドメイン駆動開発 AIと歩み始めた新規プロダクト開発の現在地
imkaoru
4
850
Things You Thought You Didn’t Need To Care About That Have a Big Impact On Your Job
hollycummins
0
230
Building, Deploying, and Monitoring Ruby Web Applications with Falcon (Kaigi on Rails 2025)
ioquatix
4
2.2k
Claude Agent SDK を使ってみよう
hyshu
0
1.2k
(Extension DC 2025) Actor境界を越える技術
teamhimeh
1
260
技術的負債の正体を知って向き合う
irof
0
190
Android16 Migration Stories ~Building a Pattern for Android OS upgrades~
reoandroider
0
120
株式会社 Sun terras カンパニーデック
sunterras
0
350
The Past, Present, and Future of Enterprise Java
ivargrimstad
0
220
デミカツ切り抜きで面倒くさいことはPythonにやらせよう
aokswork3
0
250
Featured
See All Featured
ピンチをチャンスに:未来をつくるプロダクトロードマップ #pmconf2020
aki_iinuma
127
53k
How to train your dragon (web standard)
notwaldorf
97
6.3k
The Cult of Friendly URLs
andyhume
79
6.6k
How to Think Like a Performance Engineer
csswizardry
27
2k
Building Adaptive Systems
keathley
44
2.8k
CoffeeScript is Beautiful & I Never Want to Write Plain JavaScript Again
sstephenson
162
15k
個人開発の失敗を避けるイケてる考え方 / tips for indie hackers
panda_program
115
20k
"I'm Feeling Lucky" - Building Great Search Experiences for Today's Users (#IAC19)
danielanewman
230
22k
Chrome DevTools: State of the Union 2024 - Debugging React & Beyond
addyosmani
9
910
実際に使うSQLの書き方 徹底解説 / pgcon21j-tutorial
soudai
PRO
190
55k
Learning to Love Humans: Emotional Interface Design
aarron
274
41k
Design and Strategy: How to Deal with People Who Don’t "Get" Design
morganepeng
132
19k
Transcript
Test-driven- Development für Senior-Devs Oliver Klee, 2023-xx @
[email protected]
|
[email protected]
Unit- Tests?
Automatisierte Tests sind schnell
Sicher sein, dass der Code das Richtige tut
Verhindern, dass deine Änderungen etwas anderes kaputt machen
Verhindern, dass andere Leute deinen Code kaputtmachen
Auch bei komplexen Projekten nichts kaputt machen
Baue ein Sicherheitsnetz fürs Refactoring oder für TYPO3-Updates
Verbessere die Struktur des Codes
Finde die Ursache von Bugs
Grün fühlt sich gut an!
Lasst uns ein paar Begriffe klarstellen
Die zwei Programmier-Modi sauber hacky
4 Test-Phasen Setup (aufbauen) setUp() Code in der Testmethode Exercise
(ausführen) Methodenaufruf Verify (prüfen) assert…() Teardown (abbauen) tearDown()
Schreibe zuerst den Test Test schreiben Code schreiben refactoren
Wozu führt TDD? höhere Coverage minimaler Code erst denken,
dann coden Tests testen, was der Code machen soll (statt, was er tatsächlich tut) fokussiertes Coden sauberere Code-Struktur
Test- Namen
Benutze aussagekräftige Test-Namen classCanBeInstantiated setTitleSetsTitle setSizeWithZeroThrowsException hasTitleForEmptyTitleReturnsFalse Benenne das Verhalten.
Nenne die Vorbedingungen. Nenne die Methode. Benutze nicht „works“ oder „correctly“. measureFrubbleWorksCorrectly