SlideShare a Scribd company logo
1 of 18
Test Driven Development Roberto Carrera Maldonado
Once upon a time…
Once upon a time …
And they lived happily ever after
Test Driven Development
Test Driven Development
Test Driven Development
Test Driven Development
How it works? New  Requirement Q & A / Design Write a test Write code that  passes that test Refactor (Re/Design)
Let’s have some fun…
The important part…
Some considerations… Tests should be Isolated Not exhaustive but representative Easy and fast to run
Some considerations… Test features not methods Test names describe what they do, not what they test, so it is domain specific and not specific to the method/class name
Roberto Carrera Maldonado @rcarreram rcarrera@tacitknowledge.com
Happy path… with a test
Cost of defect remediation
Cost of manage the change
Roberto Carrera Maldonado @rcarreram rcarrera@tacitknowledge.com

More Related Content

Similar to Test Driven Development: Un acercamiento práctico con JUnit y Mockito

All about Salesforce certifications: Are they worth it?, Tomáš Hnízdil
All about Salesforce certifications: Are they worth it?, Tomáš HnízdilAll about Salesforce certifications: Are they worth it?, Tomáš Hnízdil
All about Salesforce certifications: Are they worth it?, Tomáš HnízdilCzechDreamin
 
Overcome-3-common-aem-delivery-challenges
Overcome-3-common-aem-delivery-challengesOvercome-3-common-aem-delivery-challenges
Overcome-3-common-aem-delivery-challengesiCiDIGITAL
 
Case Study: Time Warner Cable's Formula for Maximizing Adobe Experience Manager
Case Study: Time Warner Cable's Formula for Maximizing Adobe Experience Manager Case Study: Time Warner Cable's Formula for Maximizing Adobe Experience Manager
Case Study: Time Warner Cable's Formula for Maximizing Adobe Experience Manager Mark Kelley
 
Workshop: Behavior Driven Development - Deliver value by Naveen Kumar Singh
Workshop: Behavior Driven Development - Deliver value by Naveen Kumar SinghWorkshop: Behavior Driven Development - Deliver value by Naveen Kumar Singh
Workshop: Behavior Driven Development - Deliver value by Naveen Kumar SinghAgile ME
 
SAP P_C4H340_34 Exam: Tips & Questions to Ace It
SAP P_C4H340_34 Exam: Tips & Questions to Ace ItSAP P_C4H340_34 Exam: Tips & Questions to Ace It
SAP P_C4H340_34 Exam: Tips & Questions to Ace Itcarinachiara1
 
The OpenOffice.org specification process demystified
The OpenOffice.org specification process demystifiedThe OpenOffice.org specification process demystified
The OpenOffice.org specification process demystifiedAlexandro Colorado
 
SEM 3 MIS SUMMER 2014 ASSIGNMENTS
SEM 3 MIS SUMMER 2014 ASSIGNMENTSSEM 3 MIS SUMMER 2014 ASSIGNMENTS
SEM 3 MIS SUMMER 2014 ASSIGNMENTSsolved_assignments
 
Test plan implementation
Test plan implementation Test plan implementation
Test plan implementation Igor Goldshmidt
 
Prashant technical practices-tdd for xebia event
Prashant   technical practices-tdd for xebia eventPrashant   technical practices-tdd for xebia event
Prashant technical practices-tdd for xebia eventXebia India
 
Greythorn Whiteboard Interview Guide
Greythorn Whiteboard Interview GuideGreythorn Whiteboard Interview Guide
Greythorn Whiteboard Interview GuideVaco Seattle
 
Introduction to Test Driven Development
Introduction to Test Driven DevelopmentIntroduction to Test Driven Development
Introduction to Test Driven DevelopmentMichael Denomy
 
Quality Jam: BDD, TDD and ATDD for the Enterprise
Quality Jam: BDD, TDD and ATDD for the EnterpriseQuality Jam: BDD, TDD and ATDD for the Enterprise
Quality Jam: BDD, TDD and ATDD for the EnterpriseQASymphony
 
SPCA2013 - Test-driven Development with SharePoint 2013 and Visual Studio
SPCA2013 - Test-driven Development with SharePoint 2013 and Visual StudioSPCA2013 - Test-driven Development with SharePoint 2013 and Visual Studio
SPCA2013 - Test-driven Development with SharePoint 2013 and Visual StudioNCCOMMS
 
How Custom is your Org? CEER at Dreamforce 2019
How Custom is your Org?  CEER at Dreamforce 2019How Custom is your Org?  CEER at Dreamforce 2019
How Custom is your Org? CEER at Dreamforce 2019Steven Herod
 
Managing Product Development Chaos with Jira Software and Confluence
Managing Product Development Chaos with Jira Software and ConfluenceManaging Product Development Chaos with Jira Software and Confluence
Managing Product Development Chaos with Jira Software and ConfluenceAtlassian
 
How Meark as an enterprise leverages DSDM?
How Meark as an enterprise leverages DSDM?How Meark as an enterprise leverages DSDM?
How Meark as an enterprise leverages DSDM?AgileNetwork
 
ATDD Quiz For Managers
ATDD Quiz For ManagersATDD Quiz For Managers
ATDD Quiz For ManagersNishant Singh
 

Similar to Test Driven Development: Un acercamiento práctico con JUnit y Mockito (20)

All about Salesforce certifications: Are they worth it?, Tomáš Hnízdil
All about Salesforce certifications: Are they worth it?, Tomáš HnízdilAll about Salesforce certifications: Are they worth it?, Tomáš Hnízdil
All about Salesforce certifications: Are they worth it?, Tomáš Hnízdil
 
Overcome-3-common-aem-delivery-challenges
Overcome-3-common-aem-delivery-challengesOvercome-3-common-aem-delivery-challenges
Overcome-3-common-aem-delivery-challenges
 
Case Study: Time Warner Cable's Formula for Maximizing Adobe Experience Manager
Case Study: Time Warner Cable's Formula for Maximizing Adobe Experience Manager Case Study: Time Warner Cable's Formula for Maximizing Adobe Experience Manager
Case Study: Time Warner Cable's Formula for Maximizing Adobe Experience Manager
 
Workshop: Behavior Driven Development - Deliver value by Naveen Kumar Singh
Workshop: Behavior Driven Development - Deliver value by Naveen Kumar SinghWorkshop: Behavior Driven Development - Deliver value by Naveen Kumar Singh
Workshop: Behavior Driven Development - Deliver value by Naveen Kumar Singh
 
SAP P_C4H340_34 Exam: Tips & Questions to Ace It
SAP P_C4H340_34 Exam: Tips & Questions to Ace ItSAP P_C4H340_34 Exam: Tips & Questions to Ace It
SAP P_C4H340_34 Exam: Tips & Questions to Ace It
 
The OpenOffice.org specification process demystified
The OpenOffice.org specification process demystifiedThe OpenOffice.org specification process demystified
The OpenOffice.org specification process demystified
 
SEM 3 MIS SUMMER 2014 ASSIGNMENTS
SEM 3 MIS SUMMER 2014 ASSIGNMENTSSEM 3 MIS SUMMER 2014 ASSIGNMENTS
SEM 3 MIS SUMMER 2014 ASSIGNMENTS
 
Test plan implementation
Test plan implementation Test plan implementation
Test plan implementation
 
Prashant technical practices-tdd for xebia event
Prashant   technical practices-tdd for xebia eventPrashant   technical practices-tdd for xebia event
Prashant technical practices-tdd for xebia event
 
Greythorn Whiteboard Interview Guide
Greythorn Whiteboard Interview GuideGreythorn Whiteboard Interview Guide
Greythorn Whiteboard Interview Guide
 
Introduction to Test Driven Development
Introduction to Test Driven DevelopmentIntroduction to Test Driven Development
Introduction to Test Driven Development
 
Quality Jam: BDD, TDD and ATDD for the Enterprise
Quality Jam: BDD, TDD and ATDD for the EnterpriseQuality Jam: BDD, TDD and ATDD for the Enterprise
Quality Jam: BDD, TDD and ATDD for the Enterprise
 
SPCA2013 - Test-driven Development with SharePoint 2013 and Visual Studio
SPCA2013 - Test-driven Development with SharePoint 2013 and Visual StudioSPCA2013 - Test-driven Development with SharePoint 2013 and Visual Studio
SPCA2013 - Test-driven Development with SharePoint 2013 and Visual Studio
 
System Development Life Cycle (SDLC) - Part I
System Development Life Cycle (SDLC)  - Part ISystem Development Life Cycle (SDLC)  - Part I
System Development Life Cycle (SDLC) - Part I
 
Journey of atdd
Journey of atddJourney of atdd
Journey of atdd
 
How Custom is your Org? CEER at Dreamforce 2019
How Custom is your Org?  CEER at Dreamforce 2019How Custom is your Org?  CEER at Dreamforce 2019
How Custom is your Org? CEER at Dreamforce 2019
 
Good behaviors
Good behaviorsGood behaviors
Good behaviors
 
Managing Product Development Chaos with Jira Software and Confluence
Managing Product Development Chaos with Jira Software and ConfluenceManaging Product Development Chaos with Jira Software and Confluence
Managing Product Development Chaos with Jira Software and Confluence
 
How Meark as an enterprise leverages DSDM?
How Meark as an enterprise leverages DSDM?How Meark as an enterprise leverages DSDM?
How Meark as an enterprise leverages DSDM?
 
ATDD Quiz For Managers
ATDD Quiz For ManagersATDD Quiz For Managers
ATDD Quiz For Managers
 

More from Software Guru

Hola Mundo del Internet de las Cosas
Hola Mundo del Internet de las CosasHola Mundo del Internet de las Cosas
Hola Mundo del Internet de las CosasSoftware Guru
 
Estructuras de datos avanzadas: Casos de uso reales
Estructuras de datos avanzadas: Casos de uso realesEstructuras de datos avanzadas: Casos de uso reales
Estructuras de datos avanzadas: Casos de uso realesSoftware Guru
 
Building bias-aware environments
Building bias-aware environmentsBuilding bias-aware environments
Building bias-aware environmentsSoftware Guru
 
El secreto para ser un desarrollador Senior
El secreto para ser un desarrollador SeniorEl secreto para ser un desarrollador Senior
El secreto para ser un desarrollador SeniorSoftware Guru
 
Cómo encontrar el trabajo remoto ideal
Cómo encontrar el trabajo remoto idealCómo encontrar el trabajo remoto ideal
Cómo encontrar el trabajo remoto idealSoftware Guru
 
Automatizando ideas con Apache Airflow
Automatizando ideas con Apache AirflowAutomatizando ideas con Apache Airflow
Automatizando ideas con Apache AirflowSoftware Guru
 
How thick data can improve big data analysis for business:
How thick data can improve big data analysis for business:How thick data can improve big data analysis for business:
How thick data can improve big data analysis for business:Software Guru
 
Introducción al machine learning
Introducción al machine learningIntroducción al machine learning
Introducción al machine learningSoftware Guru
 
Democratizando el uso de CoDi
Democratizando el uso de CoDiDemocratizando el uso de CoDi
Democratizando el uso de CoDiSoftware Guru
 
Gestionando la felicidad de los equipos con Management 3.0
Gestionando la felicidad de los equipos con Management 3.0Gestionando la felicidad de los equipos con Management 3.0
Gestionando la felicidad de los equipos con Management 3.0Software Guru
 
Taller: Creación de Componentes Web re-usables con StencilJS
Taller: Creación de Componentes Web re-usables con StencilJSTaller: Creación de Componentes Web re-usables con StencilJS
Taller: Creación de Componentes Web re-usables con StencilJSSoftware Guru
 
El camino del full stack developer (o como hacemos en SERTI para que no solo ...
El camino del full stack developer (o como hacemos en SERTI para que no solo ...El camino del full stack developer (o como hacemos en SERTI para que no solo ...
El camino del full stack developer (o como hacemos en SERTI para que no solo ...Software Guru
 
¿Qué significa ser un programador en Bitso?
¿Qué significa ser un programador en Bitso?¿Qué significa ser un programador en Bitso?
¿Qué significa ser un programador en Bitso?Software Guru
 
Colaboración efectiva entre desarrolladores del cliente y tu equipo.
Colaboración efectiva entre desarrolladores del cliente y tu equipo.Colaboración efectiva entre desarrolladores del cliente y tu equipo.
Colaboración efectiva entre desarrolladores del cliente y tu equipo.Software Guru
 
Pruebas de integración con Docker en Azure DevOps
Pruebas de integración con Docker en Azure DevOpsPruebas de integración con Docker en Azure DevOps
Pruebas de integración con Docker en Azure DevOpsSoftware Guru
 
Elixir + Elm: Usando lenguajes funcionales en servicios productivos
Elixir + Elm: Usando lenguajes funcionales en servicios productivosElixir + Elm: Usando lenguajes funcionales en servicios productivos
Elixir + Elm: Usando lenguajes funcionales en servicios productivosSoftware Guru
 
Así publicamos las apps de Spotify sin stress
Así publicamos las apps de Spotify sin stressAsí publicamos las apps de Spotify sin stress
Así publicamos las apps de Spotify sin stressSoftware Guru
 
Achieving Your Goals: 5 Tips to successfully achieve your goals
Achieving Your Goals: 5 Tips to successfully achieve your goalsAchieving Your Goals: 5 Tips to successfully achieve your goals
Achieving Your Goals: 5 Tips to successfully achieve your goalsSoftware Guru
 
Acciones de comunidades tech en tiempos del Covid19
Acciones de comunidades tech en tiempos del Covid19Acciones de comunidades tech en tiempos del Covid19
Acciones de comunidades tech en tiempos del Covid19Software Guru
 
De lo operativo a lo estratégico: un modelo de management de diseño
De lo operativo a lo estratégico: un modelo de management de diseñoDe lo operativo a lo estratégico: un modelo de management de diseño
De lo operativo a lo estratégico: un modelo de management de diseñoSoftware Guru
 

More from Software Guru (20)

Hola Mundo del Internet de las Cosas
Hola Mundo del Internet de las CosasHola Mundo del Internet de las Cosas
Hola Mundo del Internet de las Cosas
 
Estructuras de datos avanzadas: Casos de uso reales
Estructuras de datos avanzadas: Casos de uso realesEstructuras de datos avanzadas: Casos de uso reales
Estructuras de datos avanzadas: Casos de uso reales
 
Building bias-aware environments
Building bias-aware environmentsBuilding bias-aware environments
Building bias-aware environments
 
El secreto para ser un desarrollador Senior
El secreto para ser un desarrollador SeniorEl secreto para ser un desarrollador Senior
El secreto para ser un desarrollador Senior
 
Cómo encontrar el trabajo remoto ideal
Cómo encontrar el trabajo remoto idealCómo encontrar el trabajo remoto ideal
Cómo encontrar el trabajo remoto ideal
 
Automatizando ideas con Apache Airflow
Automatizando ideas con Apache AirflowAutomatizando ideas con Apache Airflow
Automatizando ideas con Apache Airflow
 
How thick data can improve big data analysis for business:
How thick data can improve big data analysis for business:How thick data can improve big data analysis for business:
How thick data can improve big data analysis for business:
 
Introducción al machine learning
Introducción al machine learningIntroducción al machine learning
Introducción al machine learning
 
Democratizando el uso de CoDi
Democratizando el uso de CoDiDemocratizando el uso de CoDi
Democratizando el uso de CoDi
 
Gestionando la felicidad de los equipos con Management 3.0
Gestionando la felicidad de los equipos con Management 3.0Gestionando la felicidad de los equipos con Management 3.0
Gestionando la felicidad de los equipos con Management 3.0
 
Taller: Creación de Componentes Web re-usables con StencilJS
Taller: Creación de Componentes Web re-usables con StencilJSTaller: Creación de Componentes Web re-usables con StencilJS
Taller: Creación de Componentes Web re-usables con StencilJS
 
El camino del full stack developer (o como hacemos en SERTI para que no solo ...
El camino del full stack developer (o como hacemos en SERTI para que no solo ...El camino del full stack developer (o como hacemos en SERTI para que no solo ...
El camino del full stack developer (o como hacemos en SERTI para que no solo ...
 
¿Qué significa ser un programador en Bitso?
¿Qué significa ser un programador en Bitso?¿Qué significa ser un programador en Bitso?
¿Qué significa ser un programador en Bitso?
 
Colaboración efectiva entre desarrolladores del cliente y tu equipo.
Colaboración efectiva entre desarrolladores del cliente y tu equipo.Colaboración efectiva entre desarrolladores del cliente y tu equipo.
Colaboración efectiva entre desarrolladores del cliente y tu equipo.
 
Pruebas de integración con Docker en Azure DevOps
Pruebas de integración con Docker en Azure DevOpsPruebas de integración con Docker en Azure DevOps
Pruebas de integración con Docker en Azure DevOps
 
Elixir + Elm: Usando lenguajes funcionales en servicios productivos
Elixir + Elm: Usando lenguajes funcionales en servicios productivosElixir + Elm: Usando lenguajes funcionales en servicios productivos
Elixir + Elm: Usando lenguajes funcionales en servicios productivos
 
Así publicamos las apps de Spotify sin stress
Así publicamos las apps de Spotify sin stressAsí publicamos las apps de Spotify sin stress
Así publicamos las apps de Spotify sin stress
 
Achieving Your Goals: 5 Tips to successfully achieve your goals
Achieving Your Goals: 5 Tips to successfully achieve your goalsAchieving Your Goals: 5 Tips to successfully achieve your goals
Achieving Your Goals: 5 Tips to successfully achieve your goals
 
Acciones de comunidades tech en tiempos del Covid19
Acciones de comunidades tech en tiempos del Covid19Acciones de comunidades tech en tiempos del Covid19
Acciones de comunidades tech en tiempos del Covid19
 
De lo operativo a lo estratégico: un modelo de management de diseño
De lo operativo a lo estratégico: un modelo de management de diseñoDe lo operativo a lo estratégico: un modelo de management de diseño
De lo operativo a lo estratégico: un modelo de management de diseño
 

Recently uploaded

Story boards and shot lists for my a level piece
Story boards and shot lists for my a level pieceStory boards and shot lists for my a level piece
Story boards and shot lists for my a level piececharlottematthew16
 
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationBeyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationSafe Software
 
Vector Databases 101 - An introduction to the world of Vector Databases
Vector Databases 101 - An introduction to the world of Vector DatabasesVector Databases 101 - An introduction to the world of Vector Databases
Vector Databases 101 - An introduction to the world of Vector DatabasesZilliz
 
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsKotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticscarlostorres15106
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsMark Billinghurst
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationRidwan Fadjar
 
The Future of Software Development - Devin AI Innovative Approach.pdf
The Future of Software Development - Devin AI Innovative Approach.pdfThe Future of Software Development - Devin AI Innovative Approach.pdf
The Future of Software Development - Devin AI Innovative Approach.pdfSeasiaInfotech2
 
WordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your BrandWordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your Brandgvaughan
 
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)Wonjun Hwang
 
Streamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupStreamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupFlorian Wilhelm
 
Artificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxArtificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxhariprasad279825
 
Developer Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLDeveloper Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLScyllaDB
 
Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!Manik S Magar
 
Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 3652toLead Limited
 
My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024The Digital Insurer
 
"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr BaganFwdays
 
Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsScanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsRizwan Syed
 
AI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsAI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsMemoori
 
"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii SoldatenkoFwdays
 

Recently uploaded (20)

Story boards and shot lists for my a level piece
Story boards and shot lists for my a level pieceStory boards and shot lists for my a level piece
Story boards and shot lists for my a level piece
 
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationBeyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
 
Vector Databases 101 - An introduction to the world of Vector Databases
Vector Databases 101 - An introduction to the world of Vector DatabasesVector Databases 101 - An introduction to the world of Vector Databases
Vector Databases 101 - An introduction to the world of Vector Databases
 
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsKotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR Systems
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 Presentation
 
The Future of Software Development - Devin AI Innovative Approach.pdf
The Future of Software Development - Devin AI Innovative Approach.pdfThe Future of Software Development - Devin AI Innovative Approach.pdf
The Future of Software Development - Devin AI Innovative Approach.pdf
 
WordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your BrandWordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your Brand
 
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
 
Streamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupStreamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project Setup
 
Artificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxArtificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptx
 
Developer Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLDeveloper Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQL
 
Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!
 
Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365
 
My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024
 
"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan
 
Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsScanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL Certs
 
AI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsAI as an Interface for Commercial Buildings
AI as an Interface for Commercial Buildings
 
"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko
 
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptxE-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
 

Test Driven Development: Un acercamiento práctico con JUnit y Mockito

Editor's Notes

  1. Scenario 01 (Use a cookie moster image - the application eat my exceptions)Few years ago I was working for a company where we were developing and application, and we notice that it was failing without actually understood why it was failing. At the end the problem was with the DAO layer that was eating all the exceptions, none was thrown or log when the component failed.I had many issues with my Project Manager trying to prove her that the component was full of bugs ant that these issues were causing the system to fail without letting us known. The consequences of this problem:      (1) I spent a full night rewriting the code and almost got fired because I wanted to replace a piece of code without a proof that it was failing.     (2) The system was deliver late and with a long stabilization/cleaning face because bugs were hard to find.For sure my life would be a lot easier if at that time I had a tool that helped me to justify my findings and trace errors in the code.----- Meeting Notes (8/30/11 17:58) -----Add personal cost (reputation)
  2. Scenario 02Five months ago I joined a team to finish the development of integration code for a brand new website. The original code has been develop by a team from a different company, that was very focus on generated very well javadoc documented code, that reflected the original intent of the class, but in many cases out of date, at the point that some methods have a different name or parameters. Despite the great documentation there was no way to figure out how a change would impact the overall code. We didn't have the time or budget to create a safe net to help us to prevent broken builds or unexpected behaviors. So we took a decision, for every preexisting code that we would need to modify an actual test should be written that reflects the actual intent of that code; and for every new code that we wrote a test should be created first so it helped us to ensure that the expected functionality was in place. The result: we gain confidence on the changes we were doing on previous code and with the new functionality we were certain that the code was actually doing its original intent. Our major win, the whole team was able to focus on generate the required functionality and not to worry about what would break or no.
  3. In both cases a safety net proved to be necessary to let the team focus on functionality and not on what would break or not. In the first story this mechanism would help the team to prevent bugs that weren't easy to find in the overall system, but that at class level all those issues were easier to solve.On the second case, it actually provided the confidence we required to do any changes being sure that an alarm will fire if any of our changes modify the expected behavior or if the new functionality wasn't compliant with the expected behavior. Overall help us to focus on the important things: GENERATE CODE.Having a test harness in place for your projects helps you not only to take care of the quality, but also provides you other advantages, like higher productivity and cleaner code. TDD is a methodology based on the creation and execution of test to drive your development.In more detail TDD is:
  4. Is a skill* So it takes time to achieve it.* Requires a repetitive and constant process to acquired it* Personally I have had to invest and important amount of time thinking and working on it, making sure that I use it every time I can, but also making sure that I don't use it where it doesn't fit. I start to consider that TDD was becoming part of my process when I started to feel guilty about don't writing a test before actually modify or write any code.And talking about processes... 
  5. Is a driver for design* Provides an intent * Thinking first on my tests what I want/need/expect let me do a good design without even touching the keyboard* It helps me to design base on how things are used and not how they are implemented. ** This is translate into friendlier APIs, that are focus on the users and not on the developers (us) that are creating them* Part of the contract of a good design is the refactoring and TDD helps me to do it, for free** So if I find an area of improvement to my current implementation, I can just do it, run my tests and figure out how things are
  6. Is a process* This is a personal process that as developer I have.** Does any one have a personal process for development? like PSP?** White board designs, prototypes?* It is a process because it keeps me honest about my implementation** I can not cheat my test, I either implement what the test ask for or it fails ;)* As a process it tells me when I'm done* Provides an intent 
  7. Is a boost for productivity* Provides me an intent * It helps me to reduce the fear and let me focus on generate code and changes in my application.** Don't spend time thinking what can be broken, concentrate in local things, not on the overall picture** Self protection (when you are coding, and then someone distract you, it remembers your intention and let you know what is failing)** Your focus is on narrow things* It gives me confidence in getting my goal. Because I know I can be focus on doing my code, being confident that if a change breaks the code the test will let me know that.* Reliable code lets QA team focus on larger issues. No test monkeys.Now lets talk about a little bit on how to implement TDD in your current projects using the following sample
  8. Red bar/Green bar (Write test - Execute - Write code to make it pass - Run the test - Refactor/Add functionality - Run test) First we write the test: We are making design decisions, designing the API; i.e we are forcing ourselves to think hard about how we want the code to be usedWrite just enough code: Write enough code to make the test pass. Refactor: Take a step back, look at your design and figure out ways of making it better
  9. Lets write a servlet that changes the password of a user into a given applicationThe user will provide her current user/password and the new password that must follow the following convention: length of at least 8 characters and different from the current passwordThe application will check in the database if the current credentials are valid, if so then it will validate the new password against the previous rules. For valid new password it will do the change in the database and redirect the user to a confirmation page. In case the password is invalid the application will redirect the user to an error page.
  10. ----- Meeting Notes (8/30/11 17:58) -----No crees código sin tests
  11. Talk about discovering: you need maintainable and extensible code that's easy to changeso you can react to the late discoveryWhen your developer is not anymore in that project or it just can’t remember the code she wrote: if feature X is implemented in January, and the bug is found in November, it’s a lot harder to fix. Example Developer X quit or is fire, how you fix it? How much it will cost?
  12. The image with different modules that has a cost of C, but when it starts to grow the complexity of the application and the risk of generate introduce bugs are higherCreate diagram (http://www.infoq.com/presentations/TDD-Managers-Nicolette-Scotland)