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
Sponsored
·
Your Podcast. Everywhere. Effortlessly.
Share. Educate. Inspire. Entertain. You do you. We'll handle the rest.
→
Oliver Klee
May 30, 2023
Programming
140
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
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
120
Team-Management-Plattform
oliverklee
0
87
Vertrauen in Teams & Führung
oliverklee
0
310
Software-Qualität von TYPO3-Extensions automatisieren
oliverklee
0
58
Vertrauen in Teams & Führung
oliverklee
0
170
Testing von TYPO3-Extensions
oliverklee
0
99
Software-Qualität von Extensions automatisieren
oliverklee
1
63
Content-Synchronisierung
oliverklee
0
190
Gewaltfreie Kommunikation: ein Crashkurs
oliverklee
0
380
Other Decks in Programming
See All in Programming
OSもどきOS
arkw
0
590
Webフレームワークの ベンチマークについて
yusukebe
0
180
LLMによるContent Moderationの本番運用の裏側と品質担保への挑戦
suikabar
3
790
「なぜそう決めたのか」を残し続ける仕組み ― Notion AI カスタムエージェント × Slack連携による設計判断の自動記録 - NIKKEI Tech Talk #47
niftycorp
PRO
0
230
任せる範囲はこう広がった / How the Scope of AI Delegation Has Expanded
nrslib
0
150
AIキャラアプリkaiwaの低遅延音声通話基盤をどう作ったか - AWS Gravitonで支える低遅延・低コストAI Agent基盤
mogamit
0
110
正しくソフトウェアを作る、前提を疑うための認知の視点 / doubt-premise
minodriven
21
7.1k
肥大化するレガシーコードに立ち向かうためのインターフェース分離と依存の逆転 / JJUG CCC 2026 Spring
hirokunimaeta
0
630
代数的データ型って何が嬉しいの? #frontend_phpcon_do
kajitack
8
3.8k
作って学ぶ、 JSX (TSX) ランタイムの基本
syumai
7
1.7k
Lessons from Spec-Driven Development
simas
PRO
0
220
Dataformのリポジトリを立ち上げるときにまずやること / dataform-day0-2026
snhryt
0
190
Featured
See All Featured
GraphQLの誤解/rethinking-graphql
sonatard
75
12k
The AI Search Optimization Roadmap by Aleyda Solis
aleyda
1
5.9k
Typedesign – Prime Four
hannesfritz
42
3.1k
Creating an realtime collaboration tool: Agile Flush - .NET Oxford
marcduiker
35
2.5k
Unsuck your backbone
ammeep
672
58k
How to build a perfect <img>
jonoalderson
1
5.7k
Digital Projects Gone Horribly Wrong (And the UX Pros Who Still Save the Day) - Dean Schuster
uxyall
1
1.8k
Evolution of real-time – Irina Nazarova, EuRuKo, 2024
irinanazarova
9
1.4k
Learning to Love Humans: Emotional Interface Design
aarron
275
41k
Between Models and Reality
mayunak
4
350
I Don’t Have Time: Getting Over the Fear to Launch Your Podcast
jcasabona
34
2.8k
The Illustrated Children's Guide to Kubernetes
chrisshort
51
52k
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