SlideShare uma empresa Scribd logo
1 de 55
eXtreme Programming Introduction TELEFÓNICA I+D Date: © 2010 Telefónica Investigación y Desarrollo, S.A. Unipersonal With Test-Driven Development  Jacob Cañadas <jcr@tid.es> Marc Planagumà <mpv@tid.es> Mauricio Cappella <mauricio@pollenizer.com>
[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],Part 1: overview (1h)
[object Object],[object Object],[object Object],[object Object],[object Object],Part 2: examples (1h)
eXtrem Programing  Practices:  TDD is core 01
eXtrem Programing  Practices:  TDD is core 01 TDD
Test-Driven Development is: Test Drive Development 02
[object Object],03
[object Object]
[object Object],Ex: Control access to building Check user credentials, if ok store date
[object Object],Card Reader DataBase
[object Object],OPenPCD Mysql
[object Object]
[object Object],[object Object],[object Object],[object Object],[object Object]
[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
[object Object]
Uni Test ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
[object Object],[object Object],[object Object],[object Object],[object Object]
[object Object]
[object Object],[object Object],[object Object],[object Object],[object Object]
[object Object]
[object Object]
Driven Development: where should we go? 04
Only doing Test is NOT TDD 05
1. Describe intent with tests. 2. Use the tests to validate our solution iteratively 3. Do the simplest thing that could possibly work.
Clear user stories and backlog  Contract ,[object Object],[object Object],[object Object],[object Object]
[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
 
TDD is easy and  optimal. 06 Create Time Create Team Create effectiveness
TDD is easy and  optimal. Use tests to:  ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],06
TDD is easy, and optimal replaces more expensive practices  ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],06
TDD, the easier way to XP and Agile ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],07
 
Example User Story 08 As a: Mobile phone user I want to: receive a list of 3 places to eat at less than 30min from where me and the contacts I select are So that: I can propose my contacts to meet there
Use Acceptance Tests to validate UserStory 08 Test 0:  create wireframes showing the sequence of screens the user views and validate them with the PO and user Test 0.1: is feasible?  write tests to check you can always get the information to generate the right screens in each scenario ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],(most of the mentioned application classes and methods have to be written yet!) BUT now you now exactly what the PO wants and you need!
Use Acceptance Test to drive Behavior (more on how to do this in your projects in part 2) 08 Test 0.2:  implement what you need as stubs and pass the tests for all thinkable scenarios (you wrote the top layer of your app as) ... result= nearUsApp.find(selectedContacts,&quot;placeToEat&quot;,30m) if result.length<1 { showMsg(&quot;ERROR: no places found&quot;) } else { ...  ui.showList(m) } (now you can use mock objects like) ... phoneDriver.getContacts(){ return [&quot;Juan35m&quot;,&quot;Pedro20m&quot;]} ui.selectFromList(l) { return l[0] } nearUsApp.find(contacts, kindOfPlace, timeToGetThereMax) {    if (contacts[0]==&quot;Juan35m&quot;) { return [] }    return [...3 lugares...] //you must try none, 3 near, etc.  } And  TEST  that running the application code you already wrote with different inputs (selecting different contacts) gives the expected results (no places to meet Juan35m in less tha 30min, etc.)
 
Use System Tests to drive Architecture (more on how to do this in your projects in part 2) 08 How do you get all the information the past tests show you need? How do you transport it from one place to another? Are the tools you intend to use available in the all target environments? How reliable are this tools? How fast?  Can you accommodate more than one alternative? Test:  write tests connecting to all the needed data sources and services, check your app understands all the results and errors Test:  deploy simple stress test applications using each of the tools you may use to the target environments Test:  stress test the architecture implement all the communications and data handling required by the components, using stubs only to simulate errors and ensuring you return data for all the relevant scenarios So:  the team is sure the tools work, the application can be deployed, what are the performance limits, etc.
 
Use Integration Tests to drive Design (more on how to do this in your projects in part 2) 08 Test:  write tests to define which requests and responses must support each component of your application Use simple drivers for the requests and stubs to return examples for all the possible responses So:    the team can work simultaneously in various components without integration problems the contracts and dependencies for the components are clear you can refactor anything inside as long as you respect the interface (pass the tests)
 
Use Unit Tests to find the best implementation (more on how to do this in your projects in part 2) 08 Test:  write tests to understand what do you need of each class and method Test:  write tests to show what inputs and outputs are supported So:    anyone can use, extend or modify any class or component without breaking something your code is free of defects you write only what you need in some cases you can have more than one implementation (e.g. critical algorithms, drivers, transport/communication protocols)
QUESTIONS?
Example: withdraw cash from an ATM 03
Unit test each component separately unit test unit test unit test 03
Integration test interaction of two or more components integration test integration test 03
System test usability, load, connectivity, deployment, etc . system test 03
Example: Web +integration of 3p services (GiffGaff) 03
Example: Web +integration of 3p services (GiffGaff) 03 ManInTheMiddle (developers) Selenium-IDE (developers) ManInTheMiddle (developers)
Example: Mobile +integration of 3p services (Walkopedia) 03 curl (developers)

Mais conteúdo relacionado

Mais procurados

Diving into VS 2015 Day2
Diving into VS 2015 Day2Diving into VS 2015 Day2
Diving into VS 2015 Day2Akhil Mittal
 
Testing Options in Java
Testing Options in JavaTesting Options in Java
Testing Options in JavaMichael Fons
 
Cis 355 ilab 4 of 6
Cis 355 ilab 4 of 6Cis 355 ilab 4 of 6
Cis 355 ilab 4 of 6comp274
 
Swift 2.0: Apple’s Advanced Programming Platform for Developers
Swift 2.0: Apple’s Advanced Programming Platform for DevelopersSwift 2.0: Apple’s Advanced Programming Platform for Developers
Swift 2.0: Apple’s Advanced Programming Platform for DevelopersAzilen Technologies Pvt. Ltd.
 
Cognos Macros: Situational Examples & Syntax
Cognos Macros: Situational Examples & SyntaxCognos Macros: Situational Examples & Syntax
Cognos Macros: Situational Examples & SyntaxBryan L. Mack
 

Mais procurados (6)

Diving into VS 2015 Day2
Diving into VS 2015 Day2Diving into VS 2015 Day2
Diving into VS 2015 Day2
 
Testing Options in Java
Testing Options in JavaTesting Options in Java
Testing Options in Java
 
Lecture 20-21
Lecture 20-21Lecture 20-21
Lecture 20-21
 
Cis 355 ilab 4 of 6
Cis 355 ilab 4 of 6Cis 355 ilab 4 of 6
Cis 355 ilab 4 of 6
 
Swift 2.0: Apple’s Advanced Programming Platform for Developers
Swift 2.0: Apple’s Advanced Programming Platform for DevelopersSwift 2.0: Apple’s Advanced Programming Platform for Developers
Swift 2.0: Apple’s Advanced Programming Platform for Developers
 
Cognos Macros: Situational Examples & Syntax
Cognos Macros: Situational Examples & SyntaxCognos Macros: Situational Examples & Syntax
Cognos Macros: Situational Examples & Syntax
 

Destaque

Hoe word ik een Informatie Held?
Hoe word ik een Informatie Held?Hoe word ik een Informatie Held?
Hoe word ik een Informatie Held?GO opleidingen
 
Presentacion 4 slidshare
Presentacion 4 slidsharePresentacion 4 slidshare
Presentacion 4 slidshareerijar22
 
Acuril 2016: Transition to customer focused Information services
Acuril 2016: Transition to customer focused Information servicesAcuril 2016: Transition to customer focused Information services
Acuril 2016: Transition to customer focused Information servicesGO opleidingen
 
Presentacion 4 slidshare
Presentacion 4 slidsharePresentacion 4 slidshare
Presentacion 4 slidshareerijar22
 
Эволюция корпоративных культур
Эволюция корпоративных культурЭволюция корпоративных культур
Эволюция корпоративных культурАнатолий Баляев
 
2015 03-31 diplomauitreiking go - nationaal archief
2015 03-31 diplomauitreiking go - nationaal archief2015 03-31 diplomauitreiking go - nationaal archief
2015 03-31 diplomauitreiking go - nationaal archiefGO opleidingen
 
Introductie Social Media voor Informatieprofessionals
Introductie Social Media voor InformatieprofessionalsIntroductie Social Media voor Informatieprofessionals
Introductie Social Media voor InformatieprofessionalsGO opleidingen
 
Introductie Open Data tijdens KBenP Zomerevent 2014
Introductie Open Data tijdens KBenP Zomerevent 2014Introductie Open Data tijdens KBenP Zomerevent 2014
Introductie Open Data tijdens KBenP Zomerevent 2014GO opleidingen
 
HTC_Final_Presentation_Team_1 - Copy
HTC_Final_Presentation_Team_1 - CopyHTC_Final_Presentation_Team_1 - Copy
HTC_Final_Presentation_Team_1 - CopyQuang Nguyen
 
Спиральная Динамика: Управляемые кризисы.
Спиральная Динамика: Управляемые кризисы.Спиральная Динамика: Управляемые кризисы.
Спиральная Динамика: Управляемые кризисы.Анатолий Баляев
 
Presentatie linked in
Presentatie linked inPresentatie linked in
Presentatie linked inJanAalbregt
 
Intermediate referee powerpoint(fhb modify)
Intermediate referee powerpoint(fhb modify)Intermediate referee powerpoint(fhb modify)
Intermediate referee powerpoint(fhb modify)harthb
 
Sociology Essays - Mental health & illness within Sociology
Sociology Essays - Mental health & illness within SociologySociology Essays - Mental health & illness within Sociology
Sociology Essays - Mental health & illness within SociologyUKEssays
 
Análisis de la cadena de valor de la industria de algodón. Caso de estudio de...
Análisis de la cadena de valor de la industria de algodón. Caso de estudio de...Análisis de la cadena de valor de la industria de algodón. Caso de estudio de...
Análisis de la cadena de valor de la industria de algodón. Caso de estudio de...Candela Aldao García
 

Destaque (14)

Hoe word ik een Informatie Held?
Hoe word ik een Informatie Held?Hoe word ik een Informatie Held?
Hoe word ik een Informatie Held?
 
Presentacion 4 slidshare
Presentacion 4 slidsharePresentacion 4 slidshare
Presentacion 4 slidshare
 
Acuril 2016: Transition to customer focused Information services
Acuril 2016: Transition to customer focused Information servicesAcuril 2016: Transition to customer focused Information services
Acuril 2016: Transition to customer focused Information services
 
Presentacion 4 slidshare
Presentacion 4 slidsharePresentacion 4 slidshare
Presentacion 4 slidshare
 
Эволюция корпоративных культур
Эволюция корпоративных культурЭволюция корпоративных культур
Эволюция корпоративных культур
 
2015 03-31 diplomauitreiking go - nationaal archief
2015 03-31 diplomauitreiking go - nationaal archief2015 03-31 diplomauitreiking go - nationaal archief
2015 03-31 diplomauitreiking go - nationaal archief
 
Introductie Social Media voor Informatieprofessionals
Introductie Social Media voor InformatieprofessionalsIntroductie Social Media voor Informatieprofessionals
Introductie Social Media voor Informatieprofessionals
 
Introductie Open Data tijdens KBenP Zomerevent 2014
Introductie Open Data tijdens KBenP Zomerevent 2014Introductie Open Data tijdens KBenP Zomerevent 2014
Introductie Open Data tijdens KBenP Zomerevent 2014
 
HTC_Final_Presentation_Team_1 - Copy
HTC_Final_Presentation_Team_1 - CopyHTC_Final_Presentation_Team_1 - Copy
HTC_Final_Presentation_Team_1 - Copy
 
Спиральная Динамика: Управляемые кризисы.
Спиральная Динамика: Управляемые кризисы.Спиральная Динамика: Управляемые кризисы.
Спиральная Динамика: Управляемые кризисы.
 
Presentatie linked in
Presentatie linked inPresentatie linked in
Presentatie linked in
 
Intermediate referee powerpoint(fhb modify)
Intermediate referee powerpoint(fhb modify)Intermediate referee powerpoint(fhb modify)
Intermediate referee powerpoint(fhb modify)
 
Sociology Essays - Mental health & illness within Sociology
Sociology Essays - Mental health & illness within SociologySociology Essays - Mental health & illness within Sociology
Sociology Essays - Mental health & illness within Sociology
 
Análisis de la cadena de valor de la industria de algodón. Caso de estudio de...
Análisis de la cadena de valor de la industria de algodón. Caso de estudio de...Análisis de la cadena de valor de la industria de algodón. Caso de estudio de...
Análisis de la cadena de valor de la industria de algodón. Caso de estudio de...
 

Semelhante a XP through TDD

AUTOCODECOVERGEN: PROTOTYPE OF DATA DRIVEN UNIT TEST GENRATION TOOL THAT GUAR...
AUTOCODECOVERGEN: PROTOTYPE OF DATA DRIVEN UNIT TEST GENRATION TOOL THAT GUAR...AUTOCODECOVERGEN: PROTOTYPE OF DATA DRIVEN UNIT TEST GENRATION TOOL THAT GUAR...
AUTOCODECOVERGEN: PROTOTYPE OF DATA DRIVEN UNIT TEST GENRATION TOOL THAT GUAR...acijjournal
 
Anders Claesson - Test Strategies in Agile Projects - EuroSTAR 2010
Anders Claesson - Test Strategies in Agile Projects - EuroSTAR 2010Anders Claesson - Test Strategies in Agile Projects - EuroSTAR 2010
Anders Claesson - Test Strategies in Agile Projects - EuroSTAR 2010TEST Huddle
 
Unit Testing in Flutter - From Workflow Essentials to Complex Scenarios
Unit Testing in Flutter - From Workflow Essentials to Complex ScenariosUnit Testing in Flutter - From Workflow Essentials to Complex Scenarios
Unit Testing in Flutter - From Workflow Essentials to Complex ScenariosFlutter Agency
 
How to complement TDD with static analysis
How to complement TDD with static analysisHow to complement TDD with static analysis
How to complement TDD with static analysisPVS-Studio
 
Dot Net Accenture
Dot Net AccentureDot Net Accenture
Dot Net AccentureSri K
 
Grails unit testing
Grails unit testingGrails unit testing
Grails unit testingpleeps
 
Test Driven Development (TDD) Preso 360|Flex 2010
Test Driven Development (TDD) Preso 360|Flex 2010Test Driven Development (TDD) Preso 360|Flex 2010
Test Driven Development (TDD) Preso 360|Flex 2010guest5639fa9
 
Test Driven Development (TDD) with FlexUnit 4 - 360|Flex San Jose preso
Test Driven Development (TDD) with FlexUnit 4 - 360|Flex San Jose presoTest Driven Development (TDD) with FlexUnit 4 - 360|Flex San Jose preso
Test Driven Development (TDD) with FlexUnit 4 - 360|Flex San Jose presoElad Elrom
 
The Magic Of Application Lifecycle Management In Vs Public
The Magic Of Application Lifecycle Management In Vs PublicThe Magic Of Application Lifecycle Management In Vs Public
The Magic Of Application Lifecycle Management In Vs PublicDavid Solivan
 
Stopping the Rot - Putting Legacy C++ Under Test
Stopping the Rot - Putting Legacy C++ Under TestStopping the Rot - Putting Legacy C++ Under Test
Stopping the Rot - Putting Legacy C++ Under TestSeb Rose
 
maXbox Starter 36 Software Testing
maXbox Starter 36 Software TestingmaXbox Starter 36 Software Testing
maXbox Starter 36 Software TestingMax Kleiner
 
Test driven development in .Net - 2010 + Eclipse
Test driven development in .Net - 2010 + EclipseTest driven development in .Net - 2010 + Eclipse
Test driven development in .Net - 2010 + EclipseUTC Fire & Security
 
Microservices and Prometheus (Microservices NYC 2016)
Microservices and Prometheus (Microservices NYC 2016)Microservices and Prometheus (Microservices NYC 2016)
Microservices and Prometheus (Microservices NYC 2016)Brian Brazil
 
Test-Driven Development
Test-Driven DevelopmentTest-Driven Development
Test-Driven DevelopmentJohn Blum
 
Android Test Driven Development & Android Unit Testing
Android Test Driven Development & Android Unit TestingAndroid Test Driven Development & Android Unit Testing
Android Test Driven Development & Android Unit Testingmahmoud ramadan
 
Final Project
Final ProjectFinal Project
Final Projecteclumson
 
maXbox Starter 43 Work with Code Metrics ISO Standard
maXbox Starter 43 Work with Code Metrics ISO StandardmaXbox Starter 43 Work with Code Metrics ISO Standard
maXbox Starter 43 Work with Code Metrics ISO StandardMax Kleiner
 

Semelhante a XP through TDD (20)

AUTOCODECOVERGEN: PROTOTYPE OF DATA DRIVEN UNIT TEST GENRATION TOOL THAT GUAR...
AUTOCODECOVERGEN: PROTOTYPE OF DATA DRIVEN UNIT TEST GENRATION TOOL THAT GUAR...AUTOCODECOVERGEN: PROTOTYPE OF DATA DRIVEN UNIT TEST GENRATION TOOL THAT GUAR...
AUTOCODECOVERGEN: PROTOTYPE OF DATA DRIVEN UNIT TEST GENRATION TOOL THAT GUAR...
 
Anders Claesson - Test Strategies in Agile Projects - EuroSTAR 2010
Anders Claesson - Test Strategies in Agile Projects - EuroSTAR 2010Anders Claesson - Test Strategies in Agile Projects - EuroSTAR 2010
Anders Claesson - Test Strategies in Agile Projects - EuroSTAR 2010
 
Unit Testing in Flutter - From Workflow Essentials to Complex Scenarios
Unit Testing in Flutter - From Workflow Essentials to Complex ScenariosUnit Testing in Flutter - From Workflow Essentials to Complex Scenarios
Unit Testing in Flutter - From Workflow Essentials to Complex Scenarios
 
How to complement TDD with static analysis
How to complement TDD with static analysisHow to complement TDD with static analysis
How to complement TDD with static analysis
 
Dot Net Accenture
Dot Net AccentureDot Net Accenture
Dot Net Accenture
 
Grails unit testing
Grails unit testingGrails unit testing
Grails unit testing
 
Test Driven Development (TDD) Preso 360|Flex 2010
Test Driven Development (TDD) Preso 360|Flex 2010Test Driven Development (TDD) Preso 360|Flex 2010
Test Driven Development (TDD) Preso 360|Flex 2010
 
Test Driven Development (TDD) with FlexUnit 4 - 360|Flex San Jose preso
Test Driven Development (TDD) with FlexUnit 4 - 360|Flex San Jose presoTest Driven Development (TDD) with FlexUnit 4 - 360|Flex San Jose preso
Test Driven Development (TDD) with FlexUnit 4 - 360|Flex San Jose preso
 
Why test with flex unit
Why test with flex unitWhy test with flex unit
Why test with flex unit
 
The Magic Of Application Lifecycle Management In Vs Public
The Magic Of Application Lifecycle Management In Vs PublicThe Magic Of Application Lifecycle Management In Vs Public
The Magic Of Application Lifecycle Management In Vs Public
 
Stopping the Rot - Putting Legacy C++ Under Test
Stopping the Rot - Putting Legacy C++ Under TestStopping the Rot - Putting Legacy C++ Under Test
Stopping the Rot - Putting Legacy C++ Under Test
 
maXbox Starter 36 Software Testing
maXbox Starter 36 Software TestingmaXbox Starter 36 Software Testing
maXbox Starter 36 Software Testing
 
Test driven development in .Net - 2010 + Eclipse
Test driven development in .Net - 2010 + EclipseTest driven development in .Net - 2010 + Eclipse
Test driven development in .Net - 2010 + Eclipse
 
Microservices and Prometheus (Microservices NYC 2016)
Microservices and Prometheus (Microservices NYC 2016)Microservices and Prometheus (Microservices NYC 2016)
Microservices and Prometheus (Microservices NYC 2016)
 
Test-Driven Development
Test-Driven DevelopmentTest-Driven Development
Test-Driven Development
 
Resume
ResumeResume
Resume
 
Android Test Driven Development & Android Unit Testing
Android Test Driven Development & Android Unit TestingAndroid Test Driven Development & Android Unit Testing
Android Test Driven Development & Android Unit Testing
 
J Unit
J UnitJ Unit
J Unit
 
Final Project
Final ProjectFinal Project
Final Project
 
maXbox Starter 43 Work with Code Metrics ISO Standard
maXbox Starter 43 Work with Code Metrics ISO StandardmaXbox Starter 43 Work with Code Metrics ISO Standard
maXbox Starter 43 Work with Code Metrics ISO Standard
 

Último

Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsMaria Levchenko
 
A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024Results
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationSafe Software
 
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...gurkirankumar98700
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfEnterprise Knowledge
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024Rafal Los
 
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...HostedbyConfluent
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Servicegiselly40
 
Google AI Hackathon: LLM based Evaluator for RAG
Google AI Hackathon: LLM based Evaluator for RAGGoogle AI Hackathon: LLM based Evaluator for RAG
Google AI Hackathon: LLM based Evaluator for RAGSujit Pal
 
Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Allon Mureinik
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024The Digital Insurer
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slidevu2urc
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking MenDelhi Call girls
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Miguel Araújo
 
Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Paola De la Torre
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityPrincipled Technologies
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Drew Madelung
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slidespraypatel2
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerThousandEyes
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationRidwan Fadjar
 

Último (20)

Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed texts
 
A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Service
 
Google AI Hackathon: LLM based Evaluator for RAG
Google AI Hackathon: LLM based Evaluator for RAGGoogle AI Hackathon: LLM based Evaluator for RAG
Google AI Hackathon: LLM based Evaluator for RAG
 
Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slides
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 Presentation
 

XP through TDD

  • 1. eXtreme Programming Introduction TELEFÓNICA I+D Date: © 2010 Telefónica Investigación y Desarrollo, S.A. Unipersonal With Test-Driven Development Jacob Cañadas <jcr@tid.es> Marc Planagumà <mpv@tid.es> Mauricio Cappella <mauricio@pollenizer.com>
  • 2.
  • 3.
  • 4. eXtrem Programing Practices:  TDD is core 01
  • 5. eXtrem Programing Practices:  TDD is core 01 TDD
  • 6. Test-Driven Development is: Test Drive Development 02
  • 7.
  • 8.
  • 9.
  • 10.
  • 11.
  • 12.
  • 13.
  • 14.
  • 15.
  • 16.
  • 17.
  • 18.
  • 19.
  • 20.
  • 21.
  • 22.
  • 23.
  • 24.
  • 25.
  • 26. Driven Development: where should we go? 04
  • 27. Only doing Test is NOT TDD 05
  • 28. 1. Describe intent with tests. 2. Use the tests to validate our solution iteratively 3. Do the simplest thing that could possibly work.
  • 29.
  • 30.
  • 31.
  • 32.
  • 33.  
  • 34. TDD is easy and optimal. 06 Create Time Create Team Create effectiveness
  • 35.
  • 36.
  • 37.
  • 38.  
  • 39. Example User Story 08 As a: Mobile phone user I want to: receive a list of 3 places to eat at less than 30min from where me and the contacts I select are So that: I can propose my contacts to meet there
  • 40.
  • 41. Use Acceptance Test to drive Behavior (more on how to do this in your projects in part 2) 08 Test 0.2: implement what you need as stubs and pass the tests for all thinkable scenarios (you wrote the top layer of your app as) ... result= nearUsApp.find(selectedContacts,&quot;placeToEat&quot;,30m) if result.length<1 { showMsg(&quot;ERROR: no places found&quot;) } else { ...  ui.showList(m) } (now you can use mock objects like) ... phoneDriver.getContacts(){ return [&quot;Juan35m&quot;,&quot;Pedro20m&quot;]} ui.selectFromList(l) { return l[0] } nearUsApp.find(contacts, kindOfPlace, timeToGetThereMax) {   if (contacts[0]==&quot;Juan35m&quot;) { return [] }   return [...3 lugares...] //you must try none, 3 near, etc. } And TEST that running the application code you already wrote with different inputs (selecting different contacts) gives the expected results (no places to meet Juan35m in less tha 30min, etc.)
  • 42.  
  • 43. Use System Tests to drive Architecture (more on how to do this in your projects in part 2) 08 How do you get all the information the past tests show you need? How do you transport it from one place to another? Are the tools you intend to use available in the all target environments? How reliable are this tools? How fast? Can you accommodate more than one alternative? Test: write tests connecting to all the needed data sources and services, check your app understands all the results and errors Test: deploy simple stress test applications using each of the tools you may use to the target environments Test: stress test the architecture implement all the communications and data handling required by the components, using stubs only to simulate errors and ensuring you return data for all the relevant scenarios So: the team is sure the tools work, the application can be deployed, what are the performance limits, etc.
  • 44.  
  • 45. Use Integration Tests to drive Design (more on how to do this in your projects in part 2) 08 Test: write tests to define which requests and responses must support each component of your application Use simple drivers for the requests and stubs to return examples for all the possible responses So:   the team can work simultaneously in various components without integration problems the contracts and dependencies for the components are clear you can refactor anything inside as long as you respect the interface (pass the tests)
  • 46.  
  • 47. Use Unit Tests to find the best implementation (more on how to do this in your projects in part 2) 08 Test: write tests to understand what do you need of each class and method Test: write tests to show what inputs and outputs are supported So:   anyone can use, extend or modify any class or component without breaking something your code is free of defects you write only what you need in some cases you can have more than one implementation (e.g. critical algorithms, drivers, transport/communication protocols)
  • 49. Example: withdraw cash from an ATM 03
  • 50. Unit test each component separately unit test unit test unit test 03
  • 51. Integration test interaction of two or more components integration test integration test 03
  • 52. System test usability, load, connectivity, deployment, etc . system test 03
  • 53. Example: Web +integration of 3p services (GiffGaff) 03
  • 54. Example: Web +integration of 3p services (GiffGaff) 03 ManInTheMiddle (developers) Selenium-IDE (developers) ManInTheMiddle (developers)
  • 55. Example: Mobile +integration of 3p services (Walkopedia) 03 curl (developers)

Notas do Editor

  1. V tradicional, tipos de test y que se testea en cada uno   UserStory=&amp;quot;como titular de una cuenta quiero extaer dinero del ATM&amp;quot; (seria bueno que las partes de la V paso a paso, desde aceptación hasta unit, mostrando que se testea en cada paso: 1. acept= una persona hace la oon peracion con/sin fondos suficientes 2. sys= concurrencia, etc. 3. Integracion= ATM Backend del banco 4. unit= modulo &amp;quot;Cuenta&amp;quot; con extraer(monto), depositar(monto) y getSaldo() Por ahi conviene hacer un slide para cada nivel e ir mostrando la V cada vez mas completa en el medio
  2. V tradicional, tipos de test y que se testea en cada uno   UserStory=&amp;quot;como titular de una cuenta quiero extaer dinero del ATM&amp;quot; (seria bueno que las partes de la V paso a paso, desde aceptación hasta unit, mostrando que se testea en cada paso: 1. acept= una persona hace la oon peracion con/sin fondos suficientes 2. sys= concurrencia, etc. 3. Integracion= ATM Backend del banco 4. unit= modulo &amp;quot;Cuenta&amp;quot; con extraer(monto), depositar(monto) y getSaldo() Por ahi conviene hacer un slide para cada nivel e ir mostrando la V cada vez mas completa en el medio
  3. V tradicional, tipos de test y que se testea en cada uno   UserStory=&amp;quot;como titular de una cuenta quiero extaer dinero del ATM&amp;quot; (seria bueno que las partes de la V paso a paso, desde aceptación hasta unit, mostrando que se testea en cada paso: 1. acept= una persona hace la oon peracion con/sin fondos suficientes 2. sys= concurrencia, etc. 3. Integracion= ATM Backend del banco 4. unit= modulo &amp;quot;Cuenta&amp;quot; con extraer(monto), depositar(monto) y getSaldo() Por ahi conviene hacer un slide para cada nivel e ir mostrando la V cada vez mas completa en el medio
  4. V tradicional, tipos de test y que se testea en cada uno   UserStory=&amp;quot;como titular de una cuenta quiero extaer dinero del ATM&amp;quot; (seria bueno que las partes de la V paso a paso, desde aceptación hasta unit, mostrando que se testea en cada paso: 1. acept= una persona hace la oon peracion con/sin fondos suficientes 2. sys= concurrencia, etc. 3. Integracion= ATM Backend del banco 4. unit= modulo &amp;quot;Cuenta&amp;quot; con extraer(monto), depositar(monto) y getSaldo() Por ahi conviene hacer un slide para cada nivel e ir mostrando la V cada vez mas completa en el medio
  5. V tradicional, tipos de test y que se testea en cada uno   UserStory=&amp;quot;como titular de una cuenta quiero extaer dinero del ATM&amp;quot; (seria bueno que las partes de la V paso a paso, desde aceptación hasta unit, mostrando que se testea en cada paso: 1. acept= una persona hace la oon peracion con/sin fondos suficientes 2. sys= concurrencia, etc. 3. Integracion= ATM Backend del banco 4. unit= modulo &amp;quot;Cuenta&amp;quot; con extraer(monto), depositar(monto) y getSaldo() Por ahi conviene hacer un slide para cada nivel e ir mostrando la V cada vez mas completa en el medio
  6. V tradicional, tipos de test y que se testea en cada uno   UserStory=&amp;quot;como titular de una cuenta quiero extaer dinero del ATM&amp;quot; (seria bueno que las partes de la V paso a paso, desde aceptación hasta unit, mostrando que se testea en cada paso: 1. acept= una persona hace la oon peracion con/sin fondos suficientes 2. sys= concurrencia, etc. 3. Integracion= ATM Backend del banco 4. unit= modulo &amp;quot;Cuenta&amp;quot; con extraer(monto), depositar(monto) y getSaldo() Por ahi conviene hacer un slide para cada nivel e ir mostrando la V cada vez mas completa en el medio
  7. 2 funciones simples y una que llama a estas dos   UserStory=&amp;quot;como titular de una cuenta quiero extaer dinero del ATM&amp;quot; (seria bueno que las partes de la V paso a paso, desde aceptación hasta unit, mostrando que se testea en cada paso: 1. acept= una persona hace la oon peracion con/sin fondos suficientes 2. sys= concurrencia, etc. 3. Integracion= ATM Backend del banco 4. unit= modulo &amp;quot;Cuenta&amp;quot; con extraer(monto), depositar(monto) y getSaldo() Por ahi conviene hacer un slide para cada nivel e ir mostrando la V cada vez mas completa en el medio
  8. 2 funciones simples y una que llama a estas dos   UserStory=&amp;quot;como titular de una cuenta quiero extaer dinero del ATM&amp;quot; (seria bueno que las partes de la V paso a paso, desde aceptación hasta unit, mostrando que se testea en cada paso: 1. acept= una persona hace la oon peracion con/sin fondos suficientes 2. sys= concurrencia, etc. 3. Integracion= ATM Backend del banco 4. unit= modulo &amp;quot;Cuenta&amp;quot; con extraer(monto), depositar(monto) y getSaldo() Por ahi conviene hacer un slide para cada nivel e ir mostrando la V cada vez mas completa en el medio
  9. V tradicional, tipos de test y que se testea en cada uno   UserStory=&amp;quot;como titular de una cuenta quiero extaer dinero del ATM&amp;quot; (seria bueno que las partes de la V paso a paso, desde aceptación hasta unit, mostrando que se testea en cada paso: 1. acept= una persona hace la oon peracion con/sin fondos suficientes 2. sys= concurrencia, etc. 3. Integracion= ATM Backend del banco 4. unit= modulo &amp;quot;Cuenta&amp;quot; con extraer(monto), depositar(monto) y getSaldo() Por ahi conviene hacer un slide para cada nivel e ir mostrando la V cada vez mas completa en el medio
  10. Ejemplo de unit test   UserStory=&amp;quot;como titular de una cuenta quiero extaer dinero del ATM&amp;quot; (seria bueno que las partes de la V paso a paso, desde aceptación hasta unit, mostrando que se testea en cada paso: 1. acept= una persona hace la oon peracion con/sin fondos suficientes 2. sys= concurrencia, etc. 3. Integracion= ATM Backend del banco 4. unit= modulo &amp;quot;Cuenta&amp;quot; con extraer(monto), depositar(monto) y getSaldo() Por ahi conviene hacer un slide para cada nivel e ir mostrando la V cada vez mas completa en el medio
  11. 2 funciones simples y una que llama a estas dos   UserStory=&amp;quot;como titular de una cuenta quiero extaer dinero del ATM&amp;quot; (seria bueno que las partes de la V paso a paso, desde aceptación hasta unit, mostrando que se testea en cada paso: 1. acept= una persona hace la oon peracion con/sin fondos suficientes 2. sys= concurrencia, etc. 3. Integracion= ATM Backend del banco 4. unit= modulo &amp;quot;Cuenta&amp;quot; con extraer(monto), depositar(monto) y getSaldo() Por ahi conviene hacer un slide para cada nivel e ir mostrando la V cada vez mas completa en el medio
  12. Ejemplos de Mocks  
  13. 2 funciones simples y una que llama a estas dos   UserStory=&amp;quot;como titular de una cuenta quiero extaer dinero del ATM&amp;quot; (seria bueno que las partes de la V paso a paso, desde aceptación hasta unit, mostrando que se testea en cada paso: 1. acept= una persona hace la oon peracion con/sin fondos suficientes 2. sys= concurrencia, etc. 3. Integracion= ATM Backend del banco 4. unit= modulo &amp;quot;Cuenta&amp;quot; con extraer(monto), depositar(monto) y getSaldo() Por ahi conviene hacer un slide para cada nivel e ir mostrando la V cada vez mas completa en el medio
  14. V tradicional, tipos de test y que se testea en cada uno   UserStory=&amp;quot;como titular de una cuenta quiero extaer dinero del ATM&amp;quot; (seria bueno que las partes de la V paso a paso, desde aceptación hasta unit, mostrando que se testea en cada paso: 1. acept= una persona hace la oon peracion con/sin fondos suficientes 2. sys= concurrencia, etc. 3. Integracion= ATM Backend del banco 4. unit= modulo &amp;quot;Cuenta&amp;quot; con extraer(monto), depositar(monto) y getSaldo() Por ahi conviene hacer un slide para cada nivel e ir mostrando la V cada vez mas completa en el medio
  15. Se explica que dada una carga el sistema sigue comportandose de manera normal, es concurrente, etc.   UserStory=&amp;quot;como titular de una cuenta quiero extaer dinero del ATM&amp;quot; (seria bueno que las partes de la V paso a paso, desde aceptación hasta unit, mostrando que se testea en cada paso: 1. acept= una persona hace la oon peracion con/sin fondos suficientes 2. sys= concurrencia, etc. 3. Integracion= ATM Backend del banco 4. unit= modulo &amp;quot;Cuenta&amp;quot; con extraer(monto), depositar(monto) y getSaldo() Por ahi conviene hacer un slide para cada nivel e ir mostrando la V cada vez mas completa en el medio
  16. El cliente puede comprobar que la aplicacion hace lo que el espera   UserStory=&amp;quot;como titular de una cuenta quiero extaer dinero del ATM&amp;quot; (seria bueno que las partes de la V paso a paso, desde aceptación hasta unit, mostrando que se testea en cada paso: 1. acept= una persona hace la oon peracion con/sin fondos suficientes 2. sys= concurrencia, etc. 3. Integracion= ATM Backend del banco 4. unit= modulo &amp;quot;Cuenta&amp;quot; con extraer(monto), depositar(monto) y getSaldo() Por ahi conviene hacer un slide para cada nivel e ir mostrando la V cada vez mas completa en el medio