Test-driven Development, Chicago- vs. London-Style #slideless

Stefan Hildebrandt / @hildebrandttk

Wer bin ich

Portrait von Stefan Hildebrandt

Test-driven-development

Test-driven-development

  1. Schreibe einen Test der fehlschlägt, da er unerfüllte Anforderungen beschreibt
  2. Erstelle eine minimale Implementierung um den Test zu fixen
  3. Refactoring
    • Nur bei grünen Tests
    • Produktiv- ODER Test-Code (nicht beides!)

Beispiel

Bowling Kata

Bowling Kata

  • void roll(int pins)
  • int score()
Bowling Kata

Rules 1

  • The game consists of 10 frames. In each frame the player has two rolls to knock down 10 pins. The score for the frame is the total number of pins knocked down, plus bonuses for strikes and spares.
  • A spare is when the player knocks down all 10 pins in two rolls. The bonus for that frame is the number of pins knocked down by the next roll.
Bowling Kata

Rules 2

  • A strike is when the player knocks down all 10 pins on his first roll. The frame is then completed with a single roll. The bonus for that frame is the value of the next two rolls.
  • In the tenth frame a player who rolls a spare or strike is allowed to roll the extra balls to complete the frame. However no more than three balls can be rolled in tenth frame.

London (outside-in)

Mockist

London Style

Bowling Kata

Chicago (inside-out)

auch Detroit

Classics

Chicago Style

Bowling Kata

Code Diving

Zusammenfassung

Zusammenfassung

Viele weitere Spielarten

Zusammenfassung

Kein besser als ...

... unterschiedliche Stärken!

Zusammenfassung

Spielarten beherrschen und zielgerichtet einsetzen

Folien

qrcode of the given link
h9t.eu/s/tddlc

Links

Links

Stefan Hildebrandt - consulting.hildebrandt.tk

  • Beratung, Coaching und Projektunterstützung
  • Java, Spring, Quarkus
  • React, Vue, Typescript
  • Migrationen
  • Testautomatisierung
  • Coach in agilen Projekten
Datenschutz Impressum