SlideShare a Scribd company logo
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)

More Related Content

What's hot

Diving into VS 2015 Day2
Diving into VS 2015 Day2Diving into VS 2015 Day2
Diving into VS 2015 Day2
Akhil Mittal
 
Testing Options in Java
Testing Options in JavaTesting Options in Java
Testing Options in Java
Michael Fons
 
Lecture 20-21
Lecture 20-21Lecture 20-21
Lecture 20-21
talha ijaz
 
Cis 355 ilab 4 of 6
Cis 355 ilab 4 of 6Cis 355 ilab 4 of 6
Cis 355 ilab 4 of 6
comp274
 
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
Azilen Technologies Pvt. Ltd.
 
Cognos Macros: Situational Examples & Syntax
Cognos Macros: Situational Examples & SyntaxCognos Macros: Situational Examples & Syntax
Cognos Macros: Situational Examples & Syntax
Bryan L. Mack
 

What's hot (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
 

Viewers also liked

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 slidshare
erijar22
 
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
GO opleidingen
 
Presentacion 4 slidshare
Presentacion 4 slidsharePresentacion 4 slidshare
Presentacion 4 slidshare
erijar22
 
Эволюция корпоративных культур
Эволюция корпоративных культурЭволюция корпоративных культур
Эволюция корпоративных культур
Анатолий Баляев
 
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
GO opleidingen
 
Introductie Social Media voor Informatieprofessionals
Introductie Social Media voor InformatieprofessionalsIntroductie Social Media voor Informatieprofessionals
Introductie Social Media voor Informatieprofessionals
GO 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 2014
GO opleidingen
 
HTC_Final_Presentation_Team_1 - Copy
HTC_Final_Presentation_Team_1 - CopyHTC_Final_Presentation_Team_1 - Copy
HTC_Final_Presentation_Team_1 - Copy
Quang 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 Sociology
UKEssays
 
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
 

Viewers also liked (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...
 

Similar to 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 2010
TEST 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 Scenarios
Flutter 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 analysis
PVS-Studio
 
Dot Net Accenture
Dot Net AccentureDot Net Accenture
Dot Net Accenture
Sri K
 
Grails unit testing
Grails unit testingGrails unit testing
Grails unit testing
pleeps
 
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
Elad Elrom
 
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
guest5639fa9
 
Why test with flex unit
Why test with flex unitWhy test with flex unit
Why test with flex unit
michael.labriola
 
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
David 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 Test
Seb Rose
 
maXbox Starter 36 Software Testing
maXbox Starter 36 Software TestingmaXbox Starter 36 Software Testing
maXbox Starter 36 Software Testing
Max 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 + Eclipse
UTC 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 Development
John Blum
 
Resume
ResumeResume
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
mahmoud ramadan
 
J Unit
J UnitJ Unit
Final Project
Final ProjectFinal Project
Final Project
eclumson
 
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
Max Kleiner
 

Similar to 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) 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
 
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
 
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
 

Recently uploaded

Best 20 SEO Techniques To Improve Website Visibility In SERP
Best 20 SEO Techniques To Improve Website Visibility In SERPBest 20 SEO Techniques To Improve Website Visibility In SERP
Best 20 SEO Techniques To Improve Website Visibility In SERP
Pixlogix Infotech
 
Infrastructure Challenges in Scaling RAG with Custom AI models
Infrastructure Challenges in Scaling RAG with Custom AI modelsInfrastructure Challenges in Scaling RAG with Custom AI models
Infrastructure Challenges in Scaling RAG with Custom AI models
Zilliz
 
CAKE: Sharing Slices of Confidential Data on Blockchain
CAKE: Sharing Slices of Confidential Data on BlockchainCAKE: Sharing Slices of Confidential Data on Blockchain
CAKE: Sharing Slices of Confidential Data on Blockchain
Claudio Di Ciccio
 
How to use Firebase Data Connect For Flutter
How to use Firebase Data Connect For FlutterHow to use Firebase Data Connect For Flutter
How to use Firebase Data Connect For Flutter
Daiki Mogmet Ito
 
Things to Consider When Choosing a Website Developer for your Website | FODUU
Things to Consider When Choosing a Website Developer for your Website | FODUUThings to Consider When Choosing a Website Developer for your Website | FODUU
Things to Consider When Choosing a Website Developer for your Website | FODUU
FODUU
 
Uni Systems Copilot event_05062024_C.Vlachos.pdf
Uni Systems Copilot event_05062024_C.Vlachos.pdfUni Systems Copilot event_05062024_C.Vlachos.pdf
Uni Systems Copilot event_05062024_C.Vlachos.pdf
Uni Systems S.M.S.A.
 
AI-Powered Food Delivery Transforming App Development in Saudi Arabia.pdf
AI-Powered Food Delivery Transforming App Development in Saudi Arabia.pdfAI-Powered Food Delivery Transforming App Development in Saudi Arabia.pdf
AI-Powered Food Delivery Transforming App Development in Saudi Arabia.pdf
Techgropse Pvt.Ltd.
 
Ocean lotus Threat actors project by John Sitima 2024 (1).pptx
Ocean lotus Threat actors project by John Sitima 2024 (1).pptxOcean lotus Threat actors project by John Sitima 2024 (1).pptx
Ocean lotus Threat actors project by John Sitima 2024 (1).pptx
SitimaJohn
 
Cosa hanno in comune un mattoncino Lego e la backdoor XZ?
Cosa hanno in comune un mattoncino Lego e la backdoor XZ?Cosa hanno in comune un mattoncino Lego e la backdoor XZ?
Cosa hanno in comune un mattoncino Lego e la backdoor XZ?
Speck&Tech
 
みなさんこんにちはこれ何文字まで入るの?40文字以下不可とか本当に意味わからないけどこれ限界文字数書いてないからマジでやばい文字数いけるんじゃないの?えこ...
みなさんこんにちはこれ何文字まで入るの?40文字以下不可とか本当に意味わからないけどこれ限界文字数書いてないからマジでやばい文字数いけるんじゃないの?えこ...みなさんこんにちはこれ何文字まで入るの?40文字以下不可とか本当に意味わからないけどこれ限界文字数書いてないからマジでやばい文字数いけるんじゃないの?えこ...
みなさんこんにちはこれ何文字まで入るの?40文字以下不可とか本当に意味わからないけどこれ限界文字数書いてないからマジでやばい文字数いけるんじゃないの?えこ...
名前 です男
 
GenAI Pilot Implementation in the organizations
GenAI Pilot Implementation in the organizationsGenAI Pilot Implementation in the organizations
GenAI Pilot Implementation in the organizations
kumardaparthi1024
 
Generating privacy-protected synthetic data using Secludy and Milvus
Generating privacy-protected synthetic data using Secludy and MilvusGenerating privacy-protected synthetic data using Secludy and Milvus
Generating privacy-protected synthetic data using Secludy and Milvus
Zilliz
 
AI 101: An Introduction to the Basics and Impact of Artificial Intelligence
AI 101: An Introduction to the Basics and Impact of Artificial IntelligenceAI 101: An Introduction to the Basics and Impact of Artificial Intelligence
AI 101: An Introduction to the Basics and Impact of Artificial Intelligence
IndexBug
 
GraphRAG for Life Science to increase LLM accuracy
GraphRAG for Life Science to increase LLM accuracyGraphRAG for Life Science to increase LLM accuracy
GraphRAG for Life Science to increase LLM accuracy
Tomaz Bratanic
 
Removing Uninteresting Bytes in Software Fuzzing
Removing Uninteresting Bytes in Software FuzzingRemoving Uninteresting Bytes in Software Fuzzing
Removing Uninteresting Bytes in Software Fuzzing
Aftab Hussain
 
Let's Integrate MuleSoft RPA, COMPOSER, APM with AWS IDP along with Slack
Let's Integrate MuleSoft RPA, COMPOSER, APM with AWS IDP along with SlackLet's Integrate MuleSoft RPA, COMPOSER, APM with AWS IDP along with Slack
Let's Integrate MuleSoft RPA, COMPOSER, APM with AWS IDP along with Slack
shyamraj55
 
Video Streaming: Then, Now, and in the Future
Video Streaming: Then, Now, and in the FutureVideo Streaming: Then, Now, and in the Future
Video Streaming: Then, Now, and in the Future
Alpen-Adria-Universität
 
Programming Foundation Models with DSPy - Meetup Slides
Programming Foundation Models with DSPy - Meetup SlidesProgramming Foundation Models with DSPy - Meetup Slides
Programming Foundation Models with DSPy - Meetup Slides
Zilliz
 
Serial Arm Control in Real Time Presentation
Serial Arm Control in Real Time PresentationSerial Arm Control in Real Time Presentation
Serial Arm Control in Real Time Presentation
tolgahangng
 
20240609 QFM020 Irresponsible AI Reading List May 2024
20240609 QFM020 Irresponsible AI Reading List May 202420240609 QFM020 Irresponsible AI Reading List May 2024
20240609 QFM020 Irresponsible AI Reading List May 2024
Matthew Sinclair
 

Recently uploaded (20)

Best 20 SEO Techniques To Improve Website Visibility In SERP
Best 20 SEO Techniques To Improve Website Visibility In SERPBest 20 SEO Techniques To Improve Website Visibility In SERP
Best 20 SEO Techniques To Improve Website Visibility In SERP
 
Infrastructure Challenges in Scaling RAG with Custom AI models
Infrastructure Challenges in Scaling RAG with Custom AI modelsInfrastructure Challenges in Scaling RAG with Custom AI models
Infrastructure Challenges in Scaling RAG with Custom AI models
 
CAKE: Sharing Slices of Confidential Data on Blockchain
CAKE: Sharing Slices of Confidential Data on BlockchainCAKE: Sharing Slices of Confidential Data on Blockchain
CAKE: Sharing Slices of Confidential Data on Blockchain
 
How to use Firebase Data Connect For Flutter
How to use Firebase Data Connect For FlutterHow to use Firebase Data Connect For Flutter
How to use Firebase Data Connect For Flutter
 
Things to Consider When Choosing a Website Developer for your Website | FODUU
Things to Consider When Choosing a Website Developer for your Website | FODUUThings to Consider When Choosing a Website Developer for your Website | FODUU
Things to Consider When Choosing a Website Developer for your Website | FODUU
 
Uni Systems Copilot event_05062024_C.Vlachos.pdf
Uni Systems Copilot event_05062024_C.Vlachos.pdfUni Systems Copilot event_05062024_C.Vlachos.pdf
Uni Systems Copilot event_05062024_C.Vlachos.pdf
 
AI-Powered Food Delivery Transforming App Development in Saudi Arabia.pdf
AI-Powered Food Delivery Transforming App Development in Saudi Arabia.pdfAI-Powered Food Delivery Transforming App Development in Saudi Arabia.pdf
AI-Powered Food Delivery Transforming App Development in Saudi Arabia.pdf
 
Ocean lotus Threat actors project by John Sitima 2024 (1).pptx
Ocean lotus Threat actors project by John Sitima 2024 (1).pptxOcean lotus Threat actors project by John Sitima 2024 (1).pptx
Ocean lotus Threat actors project by John Sitima 2024 (1).pptx
 
Cosa hanno in comune un mattoncino Lego e la backdoor XZ?
Cosa hanno in comune un mattoncino Lego e la backdoor XZ?Cosa hanno in comune un mattoncino Lego e la backdoor XZ?
Cosa hanno in comune un mattoncino Lego e la backdoor XZ?
 
みなさんこんにちはこれ何文字まで入るの?40文字以下不可とか本当に意味わからないけどこれ限界文字数書いてないからマジでやばい文字数いけるんじゃないの?えこ...
みなさんこんにちはこれ何文字まで入るの?40文字以下不可とか本当に意味わからないけどこれ限界文字数書いてないからマジでやばい文字数いけるんじゃないの?えこ...みなさんこんにちはこれ何文字まで入るの?40文字以下不可とか本当に意味わからないけどこれ限界文字数書いてないからマジでやばい文字数いけるんじゃないの?えこ...
みなさんこんにちはこれ何文字まで入るの?40文字以下不可とか本当に意味わからないけどこれ限界文字数書いてないからマジでやばい文字数いけるんじゃないの?えこ...
 
GenAI Pilot Implementation in the organizations
GenAI Pilot Implementation in the organizationsGenAI Pilot Implementation in the organizations
GenAI Pilot Implementation in the organizations
 
Generating privacy-protected synthetic data using Secludy and Milvus
Generating privacy-protected synthetic data using Secludy and MilvusGenerating privacy-protected synthetic data using Secludy and Milvus
Generating privacy-protected synthetic data using Secludy and Milvus
 
AI 101: An Introduction to the Basics and Impact of Artificial Intelligence
AI 101: An Introduction to the Basics and Impact of Artificial IntelligenceAI 101: An Introduction to the Basics and Impact of Artificial Intelligence
AI 101: An Introduction to the Basics and Impact of Artificial Intelligence
 
GraphRAG for Life Science to increase LLM accuracy
GraphRAG for Life Science to increase LLM accuracyGraphRAG for Life Science to increase LLM accuracy
GraphRAG for Life Science to increase LLM accuracy
 
Removing Uninteresting Bytes in Software Fuzzing
Removing Uninteresting Bytes in Software FuzzingRemoving Uninteresting Bytes in Software Fuzzing
Removing Uninteresting Bytes in Software Fuzzing
 
Let's Integrate MuleSoft RPA, COMPOSER, APM with AWS IDP along with Slack
Let's Integrate MuleSoft RPA, COMPOSER, APM with AWS IDP along with SlackLet's Integrate MuleSoft RPA, COMPOSER, APM with AWS IDP along with Slack
Let's Integrate MuleSoft RPA, COMPOSER, APM with AWS IDP along with Slack
 
Video Streaming: Then, Now, and in the Future
Video Streaming: Then, Now, and in the FutureVideo Streaming: Then, Now, and in the Future
Video Streaming: Then, Now, and in the Future
 
Programming Foundation Models with DSPy - Meetup Slides
Programming Foundation Models with DSPy - Meetup SlidesProgramming Foundation Models with DSPy - Meetup Slides
Programming Foundation Models with DSPy - Meetup Slides
 
Serial Arm Control in Real Time Presentation
Serial Arm Control in Real Time PresentationSerial Arm Control in Real Time Presentation
Serial Arm Control in Real Time Presentation
 
20240609 QFM020 Irresponsible AI Reading List May 2024
20240609 QFM020 Irresponsible AI Reading List May 202420240609 QFM020 Irresponsible AI Reading List May 2024
20240609 QFM020 Irresponsible AI Reading List May 2024
 

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)

Editor's Notes

  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