SlideShare una empresa de Scribd logo
1 de 22
Descargar para leer sin conexión
Test-Driven Development
e Sviluppo Incrementale
Andrea Francia
TDD Milano @ Mikamai (10 gennaio 2017)
Chi sono?
• Andrea Francia
• Programmatore specializzato su
Test-Driven Development
• Docente c/p Scuola XP
• Corso su richiesta: 

“TDD su Codice Esistente”

tdd@andreafrancia.it
Come ci insegnano
TDD?
Kent Beck. 1999. Extreme Programming Explained: Embrace Change
(Senza Test)

Legacy Code
(TDD)
Clean Code
That Works
http://ronjeffries.com/xprog/what-is-extreme-programming/
Sappiamo già come
funziona il TDD?
1.write a test
2.watch it fail
3.make it pass
4.repeat
The TDD cycle
• Add a little tests
• Run all tests and fail.
• Make change.
• Run the tests and succeed.
• Refactor to remove duplication.
Kent Beck from TDD by Example
Quali sono gli ingredienti del
TDD?
• Sviluppo Incrementale
• Test First
• Design Incrementale (detto refactor)
TODO list (1)
• We’ll make a to-do list
• 1) to remind us what we need to do,
• 2) to keep us focused,
• 3) and to tell us when we are
finished.
TODO list (2)
• When we start working on an item, we’ll make it
bold, like this.

When we finish an item, we’ll cross it off, like this. 

When we think of another test to write, we’ll add it
to the list.
The TODO list is a live
document
Example
http://www.eecs.yorku.ca/course_archive/2003-04/W/3311/sectionM/case_studies/money/
KentBeck_TDD_byexample.pdf
Dove la scrivo?
Ho un problema da
risolvere, da dove parto?
Cosa ci scrivo?
All’inizio scriviamo tutti i
test che sappiamo che
dovremmo fare
Meglio partire
dall’happy path.
Durante il lavoro
aggiungiamo ogni cosa
che non possiamo fare ora.
https://it.wikipedia.org/wiki/File:Pair_programming_1.jpg Author: Lisamarie Babik
Esercizio
Elephant Carpaccio
exercise
http://alistair.cockburn.us/Elephant+Carpaccio+exercise
Grazie
Andrea Francia
@andreafrancia

Más contenido relacionado

Similar a Test-Driven Development e Sviluppo Incrementale (TDD-Milano 2017-01-10)

Fe05 test drivenjavascriptdevelopment
Fe05   test drivenjavascriptdevelopmentFe05   test drivenjavascriptdevelopment
Fe05 test drivenjavascriptdevelopment
DotNetCampus
 
Linux Day 20091024 Test Driven Development
Linux Day 20091024 Test Driven DevelopmentLinux Day 20091024 Test Driven Development
Linux Day 20091024 Test Driven Development
Roberto Albertini
 

Similar a Test-Driven Development e Sviluppo Incrementale (TDD-Milano 2017-01-10) (20)

TDD Casi Studio
TDD Casi StudioTDD Casi Studio
TDD Casi Studio
 
Le pratiche ingegneristiche di eXtreme Programming
Le pratiche ingegneristiche di eXtreme ProgrammingLe pratiche ingegneristiche di eXtreme Programming
Le pratiche ingegneristiche di eXtreme Programming
 
Workshop: Introduzione ad TDD
Workshop: Introduzione ad TDDWorkshop: Introduzione ad TDD
Workshop: Introduzione ad TDD
 
Test Driven Development @ Xe.Net
Test Driven Development @ Xe.NetTest Driven Development @ Xe.Net
Test Driven Development @ Xe.Net
 
Delphi & Dintorni Webinar - Diventa un mago del Testing
Delphi & Dintorni Webinar - Diventa un mago del TestingDelphi & Dintorni Webinar - Diventa un mago del Testing
Delphi & Dintorni Webinar - Diventa un mago del Testing
 
Testing
TestingTesting
Testing
 
L'Occhio di Ra sul Testing
L'Occhio di Ra sul TestingL'Occhio di Ra sul Testing
L'Occhio di Ra sul Testing
 
Unit Testing
Unit TestingUnit Testing
Unit Testing
 
Fe05 test drivenjavascriptdevelopment
Fe05   test drivenjavascriptdevelopmentFe05   test drivenjavascriptdevelopment
Fe05 test drivenjavascriptdevelopment
 
A brief intro to TDD for a JUG-TAA event
A brief intro to TDD for a JUG-TAA eventA brief intro to TDD for a JUG-TAA event
A brief intro to TDD for a JUG-TAA event
 
TDD patterns and TDD strategies
TDD patterns and TDD strategiesTDD patterns and TDD strategies
TDD patterns and TDD strategies
 
PASS Virtual Chapter - Unit Testing su SQL Server
PASS Virtual Chapter - Unit Testing su SQL ServerPASS Virtual Chapter - Unit Testing su SQL Server
PASS Virtual Chapter - Unit Testing su SQL Server
 
Trust me, I'm a developer
Trust me, I'm a developerTrust me, I'm a developer
Trust me, I'm a developer
 
Breaking the ice with agile - cinque strade per rompere il ghiaccio e introdu...
Breaking the ice with agile - cinque strade per rompere il ghiaccio e introdu...Breaking the ice with agile - cinque strade per rompere il ghiaccio e introdu...
Breaking the ice with agile - cinque strade per rompere il ghiaccio e introdu...
 
Agile management
Agile managementAgile management
Agile management
 
Linux Day 20091024 Test Driven Development
Linux Day 20091024 Test Driven DevelopmentLinux Day 20091024 Test Driven Development
Linux Day 20091024 Test Driven Development
 
TDD Adozione
TDD AdozioneTDD Adozione
TDD Adozione
 
Software Testing e TDD
Software Testing e TDDSoftware Testing e TDD
Software Testing e TDD
 
Pro php refactoring
Pro php refactoringPro php refactoring
Pro php refactoring
 
Agile Project Management - the Board Game workshop
Agile Project Management  - the Board Game workshopAgile Project Management  - the Board Game workshop
Agile Project Management - the Board Game workshop
 

Más de Andrea Francia

Writing a Crawler with Python and TDD
Writing a Crawler with Python and TDDWriting a Crawler with Python and TDD
Writing a Crawler with Python and TDD
Andrea Francia
 
Subversion @ JUG Milano 11 dic 2009
Subversion @ JUG Milano 11 dic 2009Subversion @ JUG Milano 11 dic 2009
Subversion @ JUG Milano 11 dic 2009
Andrea Francia
 

Más de Andrea Francia (15)

Baby Steps TripServiceKata
Baby Steps TripServiceKataBaby Steps TripServiceKata
Baby Steps TripServiceKata
 
TDD on Legacy Code - Voxxed Days Milano 2019
TDD on Legacy Code - Voxxed Days Milano 2019TDD on Legacy Code - Voxxed Days Milano 2019
TDD on Legacy Code - Voxxed Days Milano 2019
 
Lavorare con codice legacy “non testabile” - Incontro DevOps - 8 marzo 2019 -...
Lavorare con codice legacy “non testabile” - Incontro DevOps - 8 marzo 2019 -...Lavorare con codice legacy “non testabile” - Incontro DevOps - 8 marzo 2019 -...
Lavorare con codice legacy “non testabile” - Incontro DevOps - 8 marzo 2019 -...
 
Kata in Bash a DevOpsHeroes 2018 a Parma
Kata in Bash a DevOpsHeroes 2018 a ParmaKata in Bash a DevOpsHeroes 2018 a Parma
Kata in Bash a DevOpsHeroes 2018 a Parma
 
User Stories - Andrea Francia @ WeDev 7 novembre 2018
User Stories - Andrea Francia @ WeDev 7 novembre 2018User Stories - Andrea Francia @ WeDev 7 novembre 2018
User Stories - Andrea Francia @ WeDev 7 novembre 2018
 
Test-Driven Development su Codice Esistente
Test-Driven Development su Codice EsistenteTest-Driven Development su Codice Esistente
Test-Driven Development su Codice Esistente
 
Come si applica l'OCP
Come si applica l'OCPCome si applica l'OCP
Come si applica l'OCP
 
Bash-Only Deployment
Bash-Only DeploymentBash-Only Deployment
Bash-Only Deployment
 
TDD anche su iOS
TDD anche su iOSTDD anche su iOS
TDD anche su iOS
 
Tutti i miei sbagli, versione 7 Marzo 2012 al XPUG mi
Tutti i miei sbagli, versione 7 Marzo 2012 al XPUG miTutti i miei sbagli, versione 7 Marzo 2012 al XPUG mi
Tutti i miei sbagli, versione 7 Marzo 2012 al XPUG mi
 
Writing a Crawler with Python and TDD
Writing a Crawler with Python and TDDWriting a Crawler with Python and TDD
Writing a Crawler with Python and TDD
 
Introduzione al TDD
Introduzione al TDDIntroduzione al TDD
Introduzione al TDD
 
Google C++ Testing Framework in Visual Studio 2008
Google C++ Testing Framework in Visual Studio 2008Google C++ Testing Framework in Visual Studio 2008
Google C++ Testing Framework in Visual Studio 2008
 
Subversion @ JUG Milano 11 dic 2009
Subversion @ JUG Milano 11 dic 2009Subversion @ JUG Milano 11 dic 2009
Subversion @ JUG Milano 11 dic 2009
 
Working Effectively with Legacy Code (draft)
Working Effectively with Legacy Code (draft)Working Effectively with Legacy Code (draft)
Working Effectively with Legacy Code (draft)
 

Test-Driven Development e Sviluppo Incrementale (TDD-Milano 2017-01-10)