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
140
0
Share
TDD für Senior-Devs
Oliver Klee
May 30, 2023
More Decks by Oliver Klee
See All by Oliver Klee
Gewaltfreie Kommunikation: ein Crashkurs
oliverklee
0
110
Team-Management-Plattform
oliverklee
0
77
Vertrauen in Teams & Führung
oliverklee
0
310
Software-Qualität von TYPO3-Extensions automatisieren
oliverklee
0
53
Vertrauen in Teams & Führung
oliverklee
0
170
Testing von TYPO3-Extensions
oliverklee
0
95
Software-Qualität von Extensions automatisieren
oliverklee
1
61
Content-Synchronisierung
oliverklee
0
180
Gewaltfreie Kommunikation: ein Crashkurs
oliverklee
0
370
Other Decks in Programming
See All in Programming
ついに来た!本格的なマルチクラウド時代の Google Cloud
maroon1st
0
440
🦞OpenClaw works with AWS
licux
1
370
PicoRuby for IoT: Connecting to the Cloud with MQTT
yuuu
2
780
Agentic AI & UI: Arcitecture, HITL, Emerging Standards
manfredsteyer
PRO
0
100
My daily life on Ruby
a_matsuda
3
400
継続的な負荷検証を目指して
pyama86
3
1.2k
AI時代のエンジニアリングの原則 / Engineering Principles in the AI Era
haru860
0
1.3k
決定論 vs 確率論:Gemini 3 FlashとTF-IDFを組み合わせた「法規判定エンジン」の構築
shukob
0
160
cloudnative conference 2026 flyle
azihsoyn
0
180
AI時代だからこそ「Bloc」を採用する価値があるのかもしれない
takuroabe
0
180
KMP × Kotlin 2.3 - How Android Got Slower While iOS Builds Improved by 47%
rio432
0
200
要はバランスからの卒業 #yumemi_grow
kajitack
0
170
Featured
See All Featured
Chrome DevTools: State of the Union 2024 - Debugging React & Beyond
addyosmani
10
1.2k
The #1 spot is gone: here's how to win anyway
tamaranovitovic
2
1k
Six Lessons from altMBA
skipperchong
29
4.2k
Designing Powerful Visuals for Engaging Learning
tmiket
1
370
Hiding What from Whom? A Critical Review of the History of Programming languages for Music
tomoyanonymous
2
810
HU Berlin: Industrial-Strength Natural Language Processing with spaCy and Prodigy
inesmontani
PRO
0
380
Game over? The fight for quality and originality in the time of robots
wayneb77
1
170
XXLCSS - How to scale CSS and keep your sanity
sugarenia
250
1.3M
HTML-Aware ERB: The Path to Reactive Rendering @ RubyCon 2026, Rimini, Italy
marcoroth
1
52
Avoiding the “Bad Training, Faster” Trap in the Age of AI
tmiket
0
150
How STYLIGHT went responsive
nonsquared
100
6.1k
Getting science done with accelerated Python computing platforms
jacobtomlinson
2
200
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