Baby Steps TDD Approaches

David Völkel
David VölkelSoftware Developer and IT-Consultant at codecentric AG
Baby Steps TDD
Approaches
Softwerkskammer Meetup Munich
@codecentric
09.04.2015
David Völkel
Agenda
● Pizza
● Theory
● Coding Kata
● Another beer
Baby Steps
● Who knows the notion?
● 2011 Kent Beck‘s
Responsive Design
● 2013 Adi Bolboaca
Taking Baby Steps
● 2014 Seb Rose & …
Diamond Kata
● [2014 Mikado Method]
How I stumbled upon…
Leap
change 1
Initial code state
change 2
state 1
state 2
…
change n
target code state
● slow feedback
● high risk
● exponential complexity
● problems hard to find
Stepping Stone
change 1
Initial state
change 2
state 1
state 2
…
change n
target state
get green asap
● commit on green
● revert to green
+
Stepping Stone
change 1
Initial state
change 2
state 1
state 2
…
change n
target state
+ fast feedback
+ less risk
- a bit more effort
"Taking Baby Steps“
Kata Contraints (Adi Bolboaca, Erik Talboom)
● Write Feature
● Test
● Implement
● Refactoring
2 min.
2 min.
red?
green?
git reset --hard
git commit
The “Diamond Kata“
A => A B => _A_
B_B
_A_
C => __A__
_B_B_
C___C
_B_B_
__A__
Parallel
● Old and new version
parallel at the same time
● Switch one usage at a time
old
create
new
delete old
old not used
anymore
My too big Feature
Simplification
baby
feature
Layer 1
Layer 2
integrated test against vertical slice
My too big Feature
Simplification
baby
feature
Layer 1
Layer 2
Narrow focus of test
C => __A__
_B_B_
C___C
_B_B_
__A__
C => __A__
Outside-In TDD
Feature
Layer 1
Layer 2
Unit test
Mocks
Component
Feature
Layer 1
Component
Helper Class vs. Method?
Unit test bottom up / inside-out
On-Site TDD
• Temporary assertions in production code
• Delete afterwards
• Even quicker: a REPL
public String diamond(String s) {
if (s.equals("A")) {
return s;
} else {
assertEquals("A", predecessor(s));
return (predecessor(s) + s);
}
}
Test-Recycling
• Start with simple test
• Subsequent rewrites of the
same tests
B => AB
B => ABB
B => AnBBn
Let‘s code the “Diamond Kata“!
Contraints "Taking Baby Steps“
● Write Feature
● Test
● Implement
● Refactoring
● [Don‘t talk]
A => A B => _A_
B_B
_A_
C => __A__
_B_B_
C___C
_B_B_
__A__
2 min.
2 min.
red?
green?
git reset --hard
git commit
Retrospective
Images
THOR
https://commons.wikimedia.org/wiki/File:Parkour_leap_of_faith.j
pg?uselang=de
Seattle Municipal Archives
https://commons.wikimedia.org/wiki/File:Kids_at_Kubota_Garde
n_2003.jpg
License
Creative Commons Attribution-ShareAlike 3.0
https://creativecommons.org/licenses/by-sa/3.0/de/
1 of 20

Recommended

Cracking the PM Interview by
Cracking the PM InterviewCracking the PM Interview
Cracking the PM InterviewGayle McDowell
2.8K views56 slides
Teste de software - Conhecendo e Aplicando by
Teste de software - Conhecendo e AplicandoTeste de software - Conhecendo e Aplicando
Teste de software - Conhecendo e AplicandoAndré Phillip Bertoletti
166 views64 slides
Symfony 2 : chapitre 1 - Présentation Générale by
Symfony 2 : chapitre 1 - Présentation GénéraleSymfony 2 : chapitre 1 - Présentation Générale
Symfony 2 : chapitre 1 - Présentation GénéraleAbdelkader Rhouati
6.5K views26 slides
Code Smells and Its type (With Example) by
Code Smells and Its type (With Example)Code Smells and Its type (With Example)
Code Smells and Its type (With Example)Anshul Vinayak
8.6K views35 slides
Static Code Analysis by
Static Code AnalysisStatic Code Analysis
Static Code AnalysisObika Gellineau
286 views12 slides
Develop and Build OSGi Bundles Without Pain Using IntelliJ and Gradle by
Develop and Build OSGi Bundles Without Pain Using IntelliJ and GradleDevelop and Build OSGi Bundles Without Pain Using IntelliJ and Gradle
Develop and Build OSGi Bundles Without Pain Using IntelliJ and GradleMarcus Harringer
3.5K views40 slides

More Related Content

What's hot

안드로이드 스터디 Jni 발표 자료 Rev05 송형주 by
안드로이드 스터디 Jni 발표 자료 Rev05 송형주안드로이드 스터디 Jni 발표 자료 Rev05 송형주
안드로이드 스터디 Jni 발표 자료 Rev05 송형주iamhjoo (송형주)
5.2K views45 slides
Uber Product Manager Talks: How to Crack the PM Interview by
Uber Product Manager Talks: How to Crack the PM Interview Uber Product Manager Talks: How to Crack the PM Interview
Uber Product Manager Talks: How to Crack the PM Interview Product School
6.5K views21 slides
Java Code Review Checklist by
Java Code Review ChecklistJava Code Review Checklist
Java Code Review ChecklistMahesh Chopker
7.9K views3 slides
INTRODUÇÃO AOS TESTES NO FRONT-END COM REACT JS E REACT NATIVE.pdf by
INTRODUÇÃO AOS TESTES NO FRONT-END COM REACT JS E REACT NATIVE.pdfINTRODUÇÃO AOS TESTES NO FRONT-END COM REACT JS E REACT NATIVE.pdf
INTRODUÇÃO AOS TESTES NO FRONT-END COM REACT JS E REACT NATIVE.pdfRonaldAlves15
112 views29 slides
Upload de arquivos - Laravel by
Upload de arquivos - LaravelUpload de arquivos - Laravel
Upload de arquivos - LaravelMatheus Henrique Neres dos Santos
2K views17 slides
Anwendungsfälle: Ideenmanagement mit JIRA und Confluence by
Anwendungsfälle: Ideenmanagement mit JIRA und ConfluenceAnwendungsfälle: Ideenmanagement mit JIRA und Confluence
Anwendungsfälle: Ideenmanagement mit JIRA und ConfluenceCommunardo GmbH
15.1K views14 slides

What's hot(20)

안드로이드 스터디 Jni 발표 자료 Rev05 송형주 by iamhjoo (송형주)
안드로이드 스터디 Jni 발표 자료 Rev05 송형주안드로이드 스터디 Jni 발표 자료 Rev05 송형주
안드로이드 스터디 Jni 발표 자료 Rev05 송형주
iamhjoo (송형주)5.2K views
Uber Product Manager Talks: How to Crack the PM Interview by Product School
Uber Product Manager Talks: How to Crack the PM Interview Uber Product Manager Talks: How to Crack the PM Interview
Uber Product Manager Talks: How to Crack the PM Interview
Product School6.5K views
Java Code Review Checklist by Mahesh Chopker
Java Code Review ChecklistJava Code Review Checklist
Java Code Review Checklist
Mahesh Chopker7.9K views
INTRODUÇÃO AOS TESTES NO FRONT-END COM REACT JS E REACT NATIVE.pdf by RonaldAlves15
INTRODUÇÃO AOS TESTES NO FRONT-END COM REACT JS E REACT NATIVE.pdfINTRODUÇÃO AOS TESTES NO FRONT-END COM REACT JS E REACT NATIVE.pdf
INTRODUÇÃO AOS TESTES NO FRONT-END COM REACT JS E REACT NATIVE.pdf
RonaldAlves15112 views
Anwendungsfälle: Ideenmanagement mit JIRA und Confluence by Communardo GmbH
Anwendungsfälle: Ideenmanagement mit JIRA und ConfluenceAnwendungsfälle: Ideenmanagement mit JIRA und Confluence
Anwendungsfälle: Ideenmanagement mit JIRA und Confluence
Communardo GmbH15.1K views
Steve mcconnell by Shiraz316
Steve mcconnellSteve mcconnell
Steve mcconnell
Shiraz316578 views
Software Craftsmanship - Building A Culture For The Future (GDG DevFest Istan... by Lemi Orhan Ergin
Software Craftsmanship - Building A Culture For The Future (GDG DevFest Istan...Software Craftsmanship - Building A Culture For The Future (GDG DevFest Istan...
Software Craftsmanship - Building A Culture For The Future (GDG DevFest Istan...
Lemi Orhan Ergin28K views
Building High-Growth Products with Jobs-to-be-Done by Product School
Building High-Growth Products with Jobs-to-be-DoneBuilding High-Growth Products with Jobs-to-be-Done
Building High-Growth Products with Jobs-to-be-Done
Product School1.5K views
Coding principles by DevAdnani
Coding principles Coding principles
Coding principles
DevAdnani131 views
BA and Beyond 20 - Elke Steegmans and David Vandenbroeck - Behaviour-driven d... by BA and Beyond
BA and Beyond 20 - Elke Steegmans and David Vandenbroeck - Behaviour-driven d...BA and Beyond 20 - Elke Steegmans and David Vandenbroeck - Behaviour-driven d...
BA and Beyond 20 - Elke Steegmans and David Vandenbroeck - Behaviour-driven d...
BA and Beyond2.3K views
Mocking in Python by Excella
Mocking in PythonMocking in Python
Mocking in Python
Excella3.1K views
Automation Keys in FME Server: What They Are and Why You Should Use Them by Safe Software
Automation Keys in FME Server: What They Are and Why You Should Use ThemAutomation Keys in FME Server: What They Are and Why You Should Use Them
Automation Keys in FME Server: What They Are and Why You Should Use Them
Safe Software731 views
Advantages and disadvantages of a monorepo by IanDavidson56
Advantages and disadvantages of a monorepoAdvantages and disadvantages of a monorepo
Advantages and disadvantages of a monorepo
IanDavidson561K views
TDD Desenvolvimento orientado ao teste by Rafaela Prado
TDD Desenvolvimento orientado ao testeTDD Desenvolvimento orientado ao teste
TDD Desenvolvimento orientado ao teste
Rafaela Prado190 views

Viewers also liked

Introducción práctica a TDD by
Introducción práctica a TDDIntroducción práctica a TDD
Introducción práctica a TDDrubocoptero
219 views27 slides
Clean Test Code (Clean Code Days) by
Clean Test Code (Clean Code Days)Clean Test Code (Clean Code Days)
Clean Test Code (Clean Code Days)David Völkel
2K views46 slides
Mockist vs. Classicists TDD by
Mockist vs. Classicists TDDMockist vs. Classicists TDD
Mockist vs. Classicists TDDDavid Völkel
2.3K views33 slides
Transformation Priority Premise @Softwerkskammer MUC by
Transformation Priority Premise @Softwerkskammer MUCTransformation Priority Premise @Softwerkskammer MUC
Transformation Priority Premise @Softwerkskammer MUCDavid Völkel
1.3K views22 slides
Clean Test Code by
Clean Test CodeClean Test Code
Clean Test CodeDavid Völkel
1.6K views36 slides
Wann soll ich mocken? by
Wann soll ich mocken?Wann soll ich mocken?
Wann soll ich mocken?David Völkel
748 views65 slides

Viewers also liked(13)

Introducción práctica a TDD by rubocoptero
Introducción práctica a TDDIntroducción práctica a TDD
Introducción práctica a TDD
rubocoptero219 views
Clean Test Code (Clean Code Days) by David Völkel
Clean Test Code (Clean Code Days)Clean Test Code (Clean Code Days)
Clean Test Code (Clean Code Days)
David Völkel2K views
Mockist vs. Classicists TDD by David Völkel
Mockist vs. Classicists TDDMockist vs. Classicists TDD
Mockist vs. Classicists TDD
David Völkel2.3K views
Transformation Priority Premise @Softwerkskammer MUC by David Völkel
Transformation Priority Premise @Softwerkskammer MUCTransformation Priority Premise @Softwerkskammer MUC
Transformation Priority Premise @Softwerkskammer MUC
David Völkel1.3K views
Wie wird mein Code testbar? by David Völkel
Wie wird mein Code testbar?Wie wird mein Code testbar?
Wie wird mein Code testbar?
David Völkel849 views
Mockist vs. Classicists TDD by David Völkel
Mockist vs. Classicists TDDMockist vs. Classicists TDD
Mockist vs. Classicists TDD
David Völkel3.2K views
Unit vs. Integration Tests by David Völkel
Unit vs. Integration TestsUnit vs. Integration Tests
Unit vs. Integration Tests
David Völkel2.2K views
Quality Jam: BDD, TDD and ATDD for the Enterprise by QASymphony
Quality Jam: BDD, TDD and ATDD for the EnterpriseQuality Jam: BDD, TDD and ATDD for the Enterprise
Quality Jam: BDD, TDD and ATDD for the Enterprise
QASymphony 1.9K views
Mockist vs Classicists TDD by David Völkel
Mockist vs Classicists TDDMockist vs Classicists TDD
Mockist vs Classicists TDD
David Völkel1.6K views
Integration Test Hell by David Völkel
Integration Test HellIntegration Test Hell
Integration Test Hell
David Völkel2.6K views
Bad test, good test by Seb Rose
Bad test, good testBad test, good test
Bad test, good test
Seb Rose6.7K views

More from David Völkel

Die Kunst der kleinen Schritte - Softwerkskammer Lübeck by
Die Kunst der kleinen Schritte - Softwerkskammer LübeckDie Kunst der kleinen Schritte - Softwerkskammer Lübeck
Die Kunst der kleinen Schritte - Softwerkskammer LübeckDavid Völkel
330 views64 slides
KPI Driven-Development in der Praxis - XP Days Germany by
KPI Driven-Development in der Praxis - XP Days GermanyKPI Driven-Development in der Praxis - XP Days Germany
KPI Driven-Development in der Praxis - XP Days GermanyDavid Völkel
384 views33 slides
KPI-Driven-Development by
KPI-Driven-DevelopmentKPI-Driven-Development
KPI-Driven-DevelopmentDavid Völkel
187 views31 slides
TDD Trade-Offs @Softwerkskammer Karlsruhe by
TDD Trade-Offs @Softwerkskammer KarlsruheTDD Trade-Offs @Softwerkskammer Karlsruhe
TDD Trade-Offs @Softwerkskammer KarlsruheDavid Völkel
582 views90 slides
Global Day of Coderetreat Munich 2018 by
Global Day of Coderetreat Munich 2018Global Day of Coderetreat Munich 2018
Global Day of Coderetreat Munich 2018David Völkel
151 views74 slides
Trade Off! by
Trade Off!Trade Off!
Trade Off!David Völkel
521 views22 slides

More from David Völkel(12)

Die Kunst der kleinen Schritte - Softwerkskammer Lübeck by David Völkel
Die Kunst der kleinen Schritte - Softwerkskammer LübeckDie Kunst der kleinen Schritte - Softwerkskammer Lübeck
Die Kunst der kleinen Schritte - Softwerkskammer Lübeck
David Völkel330 views
KPI Driven-Development in der Praxis - XP Days Germany by David Völkel
KPI Driven-Development in der Praxis - XP Days GermanyKPI Driven-Development in der Praxis - XP Days Germany
KPI Driven-Development in der Praxis - XP Days Germany
David Völkel384 views
TDD Trade-Offs @Softwerkskammer Karlsruhe by David Völkel
TDD Trade-Offs @Softwerkskammer KarlsruheTDD Trade-Offs @Softwerkskammer Karlsruhe
TDD Trade-Offs @Softwerkskammer Karlsruhe
David Völkel582 views
Global Day of Coderetreat Munich 2018 by David Völkel
Global Day of Coderetreat Munich 2018Global Day of Coderetreat Munich 2018
Global Day of Coderetreat Munich 2018
David Völkel151 views
Die Kunst der kleinen Schritte - XP Days Germany 2018 by David Völkel
Die Kunst der kleinen Schritte - XP Days Germany 2018Die Kunst der kleinen Schritte - XP Days Germany 2018
Die Kunst der kleinen Schritte - XP Days Germany 2018
David Völkel289 views
Global Day of Coderetreat Munich 2017 by David Völkel
Global Day of Coderetreat Munich 2017Global Day of Coderetreat Munich 2017
Global Day of Coderetreat Munich 2017
David Völkel423 views
Fake It Outside-In TDD Workshop @ Clean Code Days by David Völkel
Fake It Outside-In TDD Workshop @ Clean Code Days Fake It Outside-In TDD Workshop @ Clean Code Days
Fake It Outside-In TDD Workshop @ Clean Code Days
David Völkel670 views
Fake It Outside-In TDD @XP2017 by David Völkel
Fake It Outside-In TDD @XP2017Fake It Outside-In TDD @XP2017
Fake It Outside-In TDD @XP2017
David Völkel1.9K views
Infrastructure as Code for Beginners by David Völkel
Infrastructure as Code for BeginnersInfrastructure as Code for Beginners
Infrastructure as Code for Beginners
David Völkel1.9K views

Recently uploaded

Techstack Ltd at Slush 2023, Ukrainian delegation by
Techstack Ltd at Slush 2023, Ukrainian delegationTechstack Ltd at Slush 2023, Ukrainian delegation
Techstack Ltd at Slush 2023, Ukrainian delegationViktoriiaOpanasenko
7 views4 slides
Mobile App Development Company by
Mobile App Development CompanyMobile App Development Company
Mobile App Development CompanyRichestsoft
5 views6 slides
How To Make Your Plans Suck Less — Maarten Dalmijn at the 57th Hands-on Agile... by
How To Make Your Plans Suck Less — Maarten Dalmijn at the 57th Hands-on Agile...How To Make Your Plans Suck Less — Maarten Dalmijn at the 57th Hands-on Agile...
How To Make Your Plans Suck Less — Maarten Dalmijn at the 57th Hands-on Agile...Stefan Wolpers
42 views38 slides
Playwright Retries by
Playwright RetriesPlaywright Retries
Playwright Retriesartembondar5
6 views1 slide
Electronic AWB - Electronic Air Waybill by
Electronic AWB - Electronic Air Waybill Electronic AWB - Electronic Air Waybill
Electronic AWB - Electronic Air Waybill Freightoscope
5 views1 slide
Top-5-production-devconMunich-2023-v2.pptx by
Top-5-production-devconMunich-2023-v2.pptxTop-5-production-devconMunich-2023-v2.pptx
Top-5-production-devconMunich-2023-v2.pptxTier1 app
8 views42 slides

Recently uploaded(20)

Mobile App Development Company by Richestsoft
Mobile App Development CompanyMobile App Development Company
Mobile App Development Company
Richestsoft 5 views
How To Make Your Plans Suck Less — Maarten Dalmijn at the 57th Hands-on Agile... by Stefan Wolpers
How To Make Your Plans Suck Less — Maarten Dalmijn at the 57th Hands-on Agile...How To Make Your Plans Suck Less — Maarten Dalmijn at the 57th Hands-on Agile...
How To Make Your Plans Suck Less — Maarten Dalmijn at the 57th Hands-on Agile...
Stefan Wolpers42 views
Electronic AWB - Electronic Air Waybill by Freightoscope
Electronic AWB - Electronic Air Waybill Electronic AWB - Electronic Air Waybill
Electronic AWB - Electronic Air Waybill
Freightoscope 5 views
Top-5-production-devconMunich-2023-v2.pptx by Tier1 app
Top-5-production-devconMunich-2023-v2.pptxTop-5-production-devconMunich-2023-v2.pptx
Top-5-production-devconMunich-2023-v2.pptx
Tier1 app8 views
predicting-m3-devopsconMunich-2023-v2.pptx by Tier1 app
predicting-m3-devopsconMunich-2023-v2.pptxpredicting-m3-devopsconMunich-2023-v2.pptx
predicting-m3-devopsconMunich-2023-v2.pptx
Tier1 app12 views
predicting-m3-devopsconMunich-2023.pptx by Tier1 app
predicting-m3-devopsconMunich-2023.pptxpredicting-m3-devopsconMunich-2023.pptx
predicting-m3-devopsconMunich-2023.pptx
Tier1 app8 views
Introduction to Git Source Control by John Valentino
Introduction to Git Source ControlIntroduction to Git Source Control
Introduction to Git Source Control
John Valentino7 views
FOSSLight Community Day 2023-11-30 by Shane Coughlan
FOSSLight Community Day 2023-11-30FOSSLight Community Day 2023-11-30
FOSSLight Community Day 2023-11-30
Shane Coughlan7 views
Unlocking the Power of AI in Product Management - A Comprehensive Guide for P... by NimaTorabi2
Unlocking the Power of AI in Product Management - A Comprehensive Guide for P...Unlocking the Power of AI in Product Management - A Comprehensive Guide for P...
Unlocking the Power of AI in Product Management - A Comprehensive Guide for P...
NimaTorabi216 views
Ports-and-Adapters Architecture for Embedded HMI by Burkhard Stubert
Ports-and-Adapters Architecture for Embedded HMIPorts-and-Adapters Architecture for Embedded HMI
Ports-and-Adapters Architecture for Embedded HMI
Burkhard Stubert33 views
Automated Testing of Microsoft Power BI Reports by RTTS
Automated Testing of Microsoft Power BI ReportsAutomated Testing of Microsoft Power BI Reports
Automated Testing of Microsoft Power BI Reports
RTTS10 views
Streamlining Your Business Operations with Enterprise Application Integration... by Flexsin
Streamlining Your Business Operations with Enterprise Application Integration...Streamlining Your Business Operations with Enterprise Application Integration...
Streamlining Your Business Operations with Enterprise Application Integration...
Flexsin 5 views
Advanced API Mocking Techniques Using Wiremock by Dimpy Adhikary
Advanced API Mocking Techniques Using WiremockAdvanced API Mocking Techniques Using Wiremock
Advanced API Mocking Techniques Using Wiremock
Dimpy Adhikary5 views
tecnologia18.docx by nosi6702
tecnologia18.docxtecnologia18.docx
tecnologia18.docx
nosi67025 views
How Workforce Management Software Empowers SMEs | TraQSuite by TraQSuite
How Workforce Management Software Empowers SMEs | TraQSuiteHow Workforce Management Software Empowers SMEs | TraQSuite
How Workforce Management Software Empowers SMEs | TraQSuite
TraQSuite6 views

Baby Steps TDD Approaches