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
Team-Management-Plattform
oliverklee
0
41
Vertrauen in Teams & Führung
oliverklee
0
190
Software-Qualität von TYPO3-Extensions automatisieren
oliverklee
0
20
Vertrauen in Teams & Führung
oliverklee
0
130
Testing von TYPO3-Extensions
oliverklee
0
41
Software-Qualität von Extensions automatisieren
oliverklee
1
31
Content-Synchronisierung
oliverklee
0
130
Gewaltfreie Kommunikation: ein Crashkurs
oliverklee
0
260
Motivationspsychologie und Gamification in Non-Profit-Organisationen
oliverklee
0
160
Other Decks in Programming
See All in Programming
WindowInsetsだってテストしたい
ryunen344
1
200
Go1.25からのGOMAXPROCS
kuro_kurorrr
1
820
Cursor AI Agentと伴走する アプリケーションの高速リプレイス
daisuketakeda
1
130
PHPでWebSocketサーバーを実装しよう2025
kubotak
0
230
エラーって何種類あるの?
kajitack
5
320
GitHub Copilot and GitHub Codespaces Hands-on
ymd65536
1
130
#QiitaBash MCPのセキュリティ
ryosukedtomita
0
210
Benchmark
sysong
0
270
なぜ適用するか、移行して理解するClean Architecture 〜構造を超えて設計を継承する〜 / Why Apply, Migrate and Understand Clean Architecture - Inherit Design Beyond Structure
seike460
PRO
1
710
Beyond Portability: Live Migration for Evolving WebAssembly Workloads
chikuwait
0
400
Kotlin エンジニアへ送る:Swift 案件に参加させられる日に備えて~似てるけど色々違う Swift の仕様 / from Kotlin to Swift
lovee
1
260
GoのGenericsによるslice操作との付き合い方
syumai
3
690
Featured
See All Featured
Building a Scalable Design System with Sketch
lauravandoore
462
33k
It's Worth the Effort
3n
185
28k
RailsConf & Balkan Ruby 2019: The Past, Present, and Future of Rails at GitHub
eileencodes
138
34k
Making the Leap to Tech Lead
cromwellryan
134
9.4k
Imperfection Machines: The Place of Print at Facebook
scottboms
267
13k
Performance Is Good for Brains [We Love Speed 2024]
tammyeverts
10
930
Optimizing for Happiness
mojombo
379
70k
How to train your dragon (web standard)
notwaldorf
94
6.1k
Design and Strategy: How to Deal with People Who Don’t "Get" Design
morganepeng
130
19k
Agile that works and the tools we love
rasmusluckow
329
21k
Product Roadmaps are Hard
iamctodd
PRO
54
11k
個人開発の失敗を避けるイケてる考え方 / tips for indie hackers
panda_program
107
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