SlideShare a Scribd company logo
1 of 15
Content
 What is TTD?
Unit Test & Refactoring
Got Bugs?
Tenets of TTD.
Benifits of TDD.
Advantages & Disadvantages of TDD.
What is TDD?
 It is just about writing the test before the program.
It’s a testing technique as well as a design Technique.
In the end, there is no code without a test.
The developer can tell at any time.
Unit Tests and Refactoring are the tools of TDD.
Unit Tests
 Easy to read & understand.
Execute very quickly.
Independent of execution order.
Test specific aspects of a functionality.
Tests a very small section of code isolation.
Rapid feedback.
Refactoring
 Take existing code & change it more efficient.
Change the internal structure of code without changing
its external behavior.
Ex :-
•ab + ac = a(b+c)
Same result, but the expression is simplified.
Start Write a test for
new capability
Compile
Fix compile
errors
Run the testRun the test
And see it failAnd see it fail
Write the code
Run the testRun the test
And see it passAnd see it pass
RefactorRefactor as neededas needed
Red/Green/Refactor
Got bugs?
 Go after defect.
 Writing a test to expose it..
Write code needed to fix it.
Refactor.
Repeat.
Measure the result.
Tenets of TDD
 Split work into small requirements.
 Always start by writing a test.
Eliminate duplication.
Write the simple code to pass the test.
What can test by TDD?
 Valid inputs.
 Invalid inputs.
Errors, exceptions and events.
Boundary conditions.
Benefits for Developers
 Much less debug time.
 Code proven to meet requirement.
Test become Safety Net.
Process consulting.
Project mentoring.
Eliminate bugs.
Benefits for Business
 Shorter development cycles.
 Near zero defect.
Test become an asset.
Test are documentation.
Competitive advantage.
 Gets running code very quickly.
Development in small steps. This will make debugging
easier since we will have small code chunks to debug.
Produce fully testable code.
Design to the specification, don’t over engineer.
Advantages
 “Write test, write code to pass test, repeat” loop is
overly strict.
Setup requires some what complex wiring.
Causes people to take paths they wouldn’t otherwise.
Disadvantages
References
 “Test-Driven Development By Example”; Kent
Beck;2003.
“Refactoring, Improving The Design Of Existing Code”;
Martin Fowler;1999.
“Patterns Of Enterprise Application Architecture”; Martin
Fowler;2003.
Test Driven Development

More Related Content

What's hot

Unit tests & TDD
Unit tests & TDDUnit tests & TDD
Unit tests & TDDDror Helper
 
Agile Testing and Test Automation
Agile Testing and Test AutomationAgile Testing and Test Automation
Agile Testing and Test AutomationNaveen Kumar Singh
 
TDD (Test Driven Design)
TDD (Test Driven Design)TDD (Test Driven Design)
TDD (Test Driven Design)nedirtv
 
Unit Testing Concepts and Best Practices
Unit Testing Concepts and Best PracticesUnit Testing Concepts and Best Practices
Unit Testing Concepts and Best PracticesDerek Smith
 
Unit Testing And Mocking
Unit Testing And MockingUnit Testing And Mocking
Unit Testing And MockingJoe Wilson
 
TDD - Test Driven Development
TDD - Test Driven DevelopmentTDD - Test Driven Development
TDD - Test Driven DevelopmentTung Nguyen Thanh
 
Introduction to TDD (Test Driven development) - Ahmed Shreef
Introduction to TDD (Test Driven development) - Ahmed ShreefIntroduction to TDD (Test Driven development) - Ahmed Shreef
Introduction to TDD (Test Driven development) - Ahmed ShreefAhmed Shreef
 
Understanding Unit Testing
Understanding Unit TestingUnderstanding Unit Testing
Understanding Unit Testingikhwanhayat
 
An Introduction to Unit Testing
An Introduction to Unit TestingAn Introduction to Unit Testing
An Introduction to Unit TestingJoe Tremblay
 
Basic software-testing-concepts
Basic software-testing-conceptsBasic software-testing-concepts
Basic software-testing-conceptsmedsherb
 
Test Driven Development
Test Driven DevelopmentTest Driven Development
Test Driven Developmentguestc8093a6
 
Agile Testing Process
Agile Testing ProcessAgile Testing Process
Agile Testing ProcessIntetics
 
Test Driven Development
Test Driven DevelopmentTest Driven Development
Test Driven DevelopmentNaresh Jain
 
Automation testing & Unit testing
Automation testing & Unit testingAutomation testing & Unit testing
Automation testing & Unit testingKapil Rajpurohit
 
Software Testing 101
Software Testing 101Software Testing 101
Software Testing 101QA Hannah
 
Introduction to Bdd and cucumber
Introduction to Bdd and cucumberIntroduction to Bdd and cucumber
Introduction to Bdd and cucumberNibu Baby
 

What's hot (20)

Unit tests & TDD
Unit tests & TDDUnit tests & TDD
Unit tests & TDD
 
Agile Testing and Test Automation
Agile Testing and Test AutomationAgile Testing and Test Automation
Agile Testing and Test Automation
 
TDD (Test Driven Design)
TDD (Test Driven Design)TDD (Test Driven Design)
TDD (Test Driven Design)
 
Unit Testing Concepts and Best Practices
Unit Testing Concepts and Best PracticesUnit Testing Concepts and Best Practices
Unit Testing Concepts and Best Practices
 
Unit Testing And Mocking
Unit Testing And MockingUnit Testing And Mocking
Unit Testing And Mocking
 
TDD - Test Driven Development
TDD - Test Driven DevelopmentTDD - Test Driven Development
TDD - Test Driven Development
 
Introduction to TDD (Test Driven development) - Ahmed Shreef
Introduction to TDD (Test Driven development) - Ahmed ShreefIntroduction to TDD (Test Driven development) - Ahmed Shreef
Introduction to TDD (Test Driven development) - Ahmed Shreef
 
Understanding Unit Testing
Understanding Unit TestingUnderstanding Unit Testing
Understanding Unit Testing
 
An Introduction to Unit Testing
An Introduction to Unit TestingAn Introduction to Unit Testing
An Introduction to Unit Testing
 
Basic software-testing-concepts
Basic software-testing-conceptsBasic software-testing-concepts
Basic software-testing-concepts
 
Agile Testing by Example
Agile Testing by ExampleAgile Testing by Example
Agile Testing by Example
 
Test Driven Development
Test Driven DevelopmentTest Driven Development
Test Driven Development
 
Manual testing ppt
Manual testing pptManual testing ppt
Manual testing ppt
 
Test Driven Development
Test Driven DevelopmentTest Driven Development
Test Driven Development
 
Agile Testing Process
Agile Testing ProcessAgile Testing Process
Agile Testing Process
 
Code coverage
Code coverageCode coverage
Code coverage
 
Test Driven Development
Test Driven DevelopmentTest Driven Development
Test Driven Development
 
Automation testing & Unit testing
Automation testing & Unit testingAutomation testing & Unit testing
Automation testing & Unit testing
 
Software Testing 101
Software Testing 101Software Testing 101
Software Testing 101
 
Introduction to Bdd and cucumber
Introduction to Bdd and cucumberIntroduction to Bdd and cucumber
Introduction to Bdd and cucumber
 

Viewers also liked

Unit testing and TDD
Unit testing and TDDUnit testing and TDD
Unit testing and TDDDavid Bottiau
 
TDD vs. ATDD - What, Why, Which, When & Where
TDD vs. ATDD - What, Why, Which, When & WhereTDD vs. ATDD - What, Why, Which, When & Where
TDD vs. ATDD - What, Why, Which, When & WhereDaniel Davis
 
Agile and ATDD the perfect couple
Agile and ATDD the perfect coupleAgile and ATDD the perfect couple
Agile and ATDD the perfect coupleStephen Tucker
 
PHPUnit: from zero to hero
PHPUnit: from zero to heroPHPUnit: from zero to hero
PHPUnit: from zero to heroJeremy Cook
 
Introduction to Unit Testing with PHPUnit
Introduction to Unit Testing with PHPUnitIntroduction to Unit Testing with PHPUnit
Introduction to Unit Testing with PHPUnitMichelangelo van Dam
 
Test Driven Development with PHPUnit
Test Driven Development with PHPUnitTest Driven Development with PHPUnit
Test Driven Development with PHPUnitMindfire Solutions
 
Software Quality Assurance
Software Quality AssuranceSoftware Quality Assurance
Software Quality AssuranceSachithra Gayan
 
Unit Testing using PHPUnit
Unit Testing using  PHPUnitUnit Testing using  PHPUnit
Unit Testing using PHPUnitvaruntaliyan
 
La qualité au meilleur prix grâce aux tests unitaires
La qualité au meilleur prix grâce aux tests unitairesLa qualité au meilleur prix grâce aux tests unitaires
La qualité au meilleur prix grâce aux tests unitairesGauthier Delamarre
 
Intro sur les tests unitaires
Intro sur les tests unitairesIntro sur les tests unitaires
Intro sur les tests unitairesPHPPRO
 
TDD/BDD: ou comment j’ai appris à ne plus m’en faire avec les tests (et la doc)
TDD/BDD: ou comment j’ai appris à ne plus m’en faire avec les tests (et la doc)TDD/BDD: ou comment j’ai appris à ne plus m’en faire avec les tests (et la doc)
TDD/BDD: ou comment j’ai appris à ne plus m’en faire avec les tests (et la doc)French Scrum User Group
 
Tests d'Acceptance et Specflow
Tests d'Acceptance et SpecflowTests d'Acceptance et Specflow
Tests d'Acceptance et SpecflowCedricRup
 
L'amélioration des tests unitaires par le refactoring
L'amélioration des tests unitaires par le refactoringL'amélioration des tests unitaires par le refactoring
L'amélioration des tests unitaires par le refactoringPascal Laurin
 
[Agile Testing Day] Techniques avancées de tests
[Agile Testing Day] Techniques avancées de tests[Agile Testing Day] Techniques avancées de tests
[Agile Testing Day] Techniques avancées de testsCellenza
 

Viewers also liked (16)

Unit testing and TDD
Unit testing and TDDUnit testing and TDD
Unit testing and TDD
 
TDD vs. ATDD - What, Why, Which, When & Where
TDD vs. ATDD - What, Why, Which, When & WhereTDD vs. ATDD - What, Why, Which, When & Where
TDD vs. ATDD - What, Why, Which, When & Where
 
Agile and ATDD the perfect couple
Agile and ATDD the perfect coupleAgile and ATDD the perfect couple
Agile and ATDD the perfect couple
 
Source control
Source controlSource control
Source control
 
to Test or not to Test?
to Test or not to Test?to Test or not to Test?
to Test or not to Test?
 
PHPUnit: from zero to hero
PHPUnit: from zero to heroPHPUnit: from zero to hero
PHPUnit: from zero to hero
 
Introduction to Unit Testing with PHPUnit
Introduction to Unit Testing with PHPUnitIntroduction to Unit Testing with PHPUnit
Introduction to Unit Testing with PHPUnit
 
Test Driven Development with PHPUnit
Test Driven Development with PHPUnitTest Driven Development with PHPUnit
Test Driven Development with PHPUnit
 
Software Quality Assurance
Software Quality AssuranceSoftware Quality Assurance
Software Quality Assurance
 
Unit Testing using PHPUnit
Unit Testing using  PHPUnitUnit Testing using  PHPUnit
Unit Testing using PHPUnit
 
La qualité au meilleur prix grâce aux tests unitaires
La qualité au meilleur prix grâce aux tests unitairesLa qualité au meilleur prix grâce aux tests unitaires
La qualité au meilleur prix grâce aux tests unitaires
 
Intro sur les tests unitaires
Intro sur les tests unitairesIntro sur les tests unitaires
Intro sur les tests unitaires
 
TDD/BDD: ou comment j’ai appris à ne plus m’en faire avec les tests (et la doc)
TDD/BDD: ou comment j’ai appris à ne plus m’en faire avec les tests (et la doc)TDD/BDD: ou comment j’ai appris à ne plus m’en faire avec les tests (et la doc)
TDD/BDD: ou comment j’ai appris à ne plus m’en faire avec les tests (et la doc)
 
Tests d'Acceptance et Specflow
Tests d'Acceptance et SpecflowTests d'Acceptance et Specflow
Tests d'Acceptance et Specflow
 
L'amélioration des tests unitaires par le refactoring
L'amélioration des tests unitaires par le refactoringL'amélioration des tests unitaires par le refactoring
L'amélioration des tests unitaires par le refactoring
 
[Agile Testing Day] Techniques avancées de tests
[Agile Testing Day] Techniques avancées de tests[Agile Testing Day] Techniques avancées de tests
[Agile Testing Day] Techniques avancées de tests
 

Similar to Test Driven Development

Test Driven Development
Test Driven DevelopmentTest Driven Development
Test Driven Developmentbhochhi
 
Test Driven Development - Overview and Adoption
Test Driven Development - Overview and AdoptionTest Driven Development - Overview and Adoption
Test Driven Development - Overview and AdoptionPyxis Technologies
 
Test-Driven Development Reference Card
Test-Driven Development Reference CardTest-Driven Development Reference Card
Test-Driven Development Reference CardSeapine Software
 
Test driven development
Test driven developmentTest driven development
Test driven developmentHarry Potter
 
Test driven development
Test driven developmentTest driven development
Test driven developmentLuis Goldster
 
Test driven development
Test driven developmentTest driven development
Test driven developmentTony Nguyen
 
Test driven development
Test driven developmentTest driven development
Test driven developmentYoung Alista
 
Test driven development
Test driven developmentTest driven development
Test driven developmentJames Wong
 
Test driven development
Test driven developmentTest driven development
Test driven developmentFraboni Ec
 
TDD and Unit Testing in Golang
TDD and Unit Testing in GolangTDD and Unit Testing in Golang
TDD and Unit Testing in GolangSofian Hadiwijaya
 
Introduction to Test Driven Development
Introduction to Test Driven DevelopmentIntroduction to Test Driven Development
Introduction to Test Driven DevelopmentMichael Denomy
 
TDD- Test Driven Development
TDD- Test Driven DevelopmentTDD- Test Driven Development
TDD- Test Driven DevelopmentLiza Antoun
 
Developers’ mDay u Banjoj Luci - Milan Popović, PHP Srbija – Testimony (about...
Developers’ mDay u Banjoj Luci - Milan Popović, PHP Srbija – Testimony (about...Developers’ mDay u Banjoj Luci - Milan Popović, PHP Srbija – Testimony (about...
Developers’ mDay u Banjoj Luci - Milan Popović, PHP Srbija – Testimony (about...mCloud
 
Test-Driven Development In Action
Test-Driven Development In ActionTest-Driven Development In Action
Test-Driven Development In ActionJon Kruger
 
Test-Driven Development
Test-Driven DevelopmentTest-Driven Development
Test-Driven Developmentadrianmitev
 
Cleaner Code Through Test-Driven Development
Cleaner Code Through Test-Driven DevelopmentCleaner Code Through Test-Driven Development
Cleaner Code Through Test-Driven DevelopmentAll Things Open
 
Test Driven Development by Sameer Arora
Test Driven Development by Sameer AroraTest Driven Development by Sameer Arora
Test Driven Development by Sameer AroraXebia IT Architects
 

Similar to Test Driven Development (20)

Test Driven Development
Test Driven DevelopmentTest Driven Development
Test Driven Development
 
Test Driven Development - Overview and Adoption
Test Driven Development - Overview and AdoptionTest Driven Development - Overview and Adoption
Test Driven Development - Overview and Adoption
 
Test-Driven Development Reference Card
Test-Driven Development Reference CardTest-Driven Development Reference Card
Test-Driven Development Reference Card
 
Ian Cooper webinar for DDD Iran: Kent beck style tdd seven years after
Ian Cooper webinar for DDD Iran: Kent beck style tdd   seven years afterIan Cooper webinar for DDD Iran: Kent beck style tdd   seven years after
Ian Cooper webinar for DDD Iran: Kent beck style tdd seven years after
 
Test driven development
Test driven developmentTest driven development
Test driven development
 
Test driven development
Test driven developmentTest driven development
Test driven development
 
Test driven development
Test driven developmentTest driven development
Test driven development
 
Test driven development
Test driven developmentTest driven development
Test driven development
 
Test driven development
Test driven developmentTest driven development
Test driven development
 
Test driven development
Test driven developmentTest driven development
Test driven development
 
TDD and Unit Testing in Golang
TDD and Unit Testing in GolangTDD and Unit Testing in Golang
TDD and Unit Testing in Golang
 
Introduction to Test Driven Development
Introduction to Test Driven DevelopmentIntroduction to Test Driven Development
Introduction to Test Driven Development
 
Tdd
TddTdd
Tdd
 
Tdd
TddTdd
Tdd
 
TDD- Test Driven Development
TDD- Test Driven DevelopmentTDD- Test Driven Development
TDD- Test Driven Development
 
Developers’ mDay u Banjoj Luci - Milan Popović, PHP Srbija – Testimony (about...
Developers’ mDay u Banjoj Luci - Milan Popović, PHP Srbija – Testimony (about...Developers’ mDay u Banjoj Luci - Milan Popović, PHP Srbija – Testimony (about...
Developers’ mDay u Banjoj Luci - Milan Popović, PHP Srbija – Testimony (about...
 
Test-Driven Development In Action
Test-Driven Development In ActionTest-Driven Development In Action
Test-Driven Development In Action
 
Test-Driven Development
Test-Driven DevelopmentTest-Driven Development
Test-Driven Development
 
Cleaner Code Through Test-Driven Development
Cleaner Code Through Test-Driven DevelopmentCleaner Code Through Test-Driven Development
Cleaner Code Through Test-Driven Development
 
Test Driven Development by Sameer Arora
Test Driven Development by Sameer AroraTest Driven Development by Sameer Arora
Test Driven Development by Sameer Arora
 

Recently uploaded

5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdf5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdfWave PLM
 
TECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service providerTECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service providermohitmore19
 
Software Quality Assurance Interview Questions
Software Quality Assurance Interview QuestionsSoftware Quality Assurance Interview Questions
Software Quality Assurance Interview QuestionsArshad QA
 
How to Choose the Right Laravel Development Partner in New York City_compress...
How to Choose the Right Laravel Development Partner in New York City_compress...How to Choose the Right Laravel Development Partner in New York City_compress...
How to Choose the Right Laravel Development Partner in New York City_compress...software pro Development
 
AI & Machine Learning Presentation Template
AI & Machine Learning Presentation TemplateAI & Machine Learning Presentation Template
AI & Machine Learning Presentation TemplatePresentation.STUDIO
 
Exploring the Best Video Editing App.pdf
Exploring the Best Video Editing App.pdfExploring the Best Video Editing App.pdf
Exploring the Best Video Editing App.pdfproinshot.com
 
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...OnePlan Solutions
 
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️Delhi Call girls
 
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...Steffen Staab
 
8257 interfacing 2 in microprocessor for btech students
8257 interfacing 2 in microprocessor for btech students8257 interfacing 2 in microprocessor for btech students
8257 interfacing 2 in microprocessor for btech studentsHimanshiGarg82
 
Right Money Management App For Your Financial Goals
Right Money Management App For Your Financial GoalsRight Money Management App For Your Financial Goals
Right Money Management App For Your Financial GoalsJhone kinadey
 
Unlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language ModelsUnlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language Modelsaagamshah0812
 
AI Mastery 201: Elevating Your Workflow with Advanced LLM Techniques
AI Mastery 201: Elevating Your Workflow with Advanced LLM TechniquesAI Mastery 201: Elevating Your Workflow with Advanced LLM Techniques
AI Mastery 201: Elevating Your Workflow with Advanced LLM TechniquesVictorSzoltysek
 
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...panagenda
 
Unveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time ApplicationsUnveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time ApplicationsAlberto González Trastoy
 
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️Delhi Call girls
 
Diamond Application Development Crafting Solutions with Precision
Diamond Application Development Crafting Solutions with PrecisionDiamond Application Development Crafting Solutions with Precision
Diamond Application Development Crafting Solutions with PrecisionSolGuruz
 

Recently uploaded (20)

5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdf5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdf
 
TECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service providerTECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service provider
 
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICECHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
 
Software Quality Assurance Interview Questions
Software Quality Assurance Interview QuestionsSoftware Quality Assurance Interview Questions
Software Quality Assurance Interview Questions
 
How to Choose the Right Laravel Development Partner in New York City_compress...
How to Choose the Right Laravel Development Partner in New York City_compress...How to Choose the Right Laravel Development Partner in New York City_compress...
How to Choose the Right Laravel Development Partner in New York City_compress...
 
AI & Machine Learning Presentation Template
AI & Machine Learning Presentation TemplateAI & Machine Learning Presentation Template
AI & Machine Learning Presentation Template
 
Exploring the Best Video Editing App.pdf
Exploring the Best Video Editing App.pdfExploring the Best Video Editing App.pdf
Exploring the Best Video Editing App.pdf
 
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...
 
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
 
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
 
8257 interfacing 2 in microprocessor for btech students
8257 interfacing 2 in microprocessor for btech students8257 interfacing 2 in microprocessor for btech students
8257 interfacing 2 in microprocessor for btech students
 
Right Money Management App For Your Financial Goals
Right Money Management App For Your Financial GoalsRight Money Management App For Your Financial Goals
Right Money Management App For Your Financial Goals
 
Unlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language ModelsUnlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language Models
 
AI Mastery 201: Elevating Your Workflow with Advanced LLM Techniques
AI Mastery 201: Elevating Your Workflow with Advanced LLM TechniquesAI Mastery 201: Elevating Your Workflow with Advanced LLM Techniques
AI Mastery 201: Elevating Your Workflow with Advanced LLM Techniques
 
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
 
Unveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time ApplicationsUnveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
 
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
 
Microsoft AI Transformation Partner Playbook.pdf
Microsoft AI Transformation Partner Playbook.pdfMicrosoft AI Transformation Partner Playbook.pdf
Microsoft AI Transformation Partner Playbook.pdf
 
Diamond Application Development Crafting Solutions with Precision
Diamond Application Development Crafting Solutions with PrecisionDiamond Application Development Crafting Solutions with Precision
Diamond Application Development Crafting Solutions with Precision
 
Vip Call Girls Noida ➡️ Delhi ➡️ 9999965857 No Advance 24HRS Live
Vip Call Girls Noida ➡️ Delhi ➡️ 9999965857 No Advance 24HRS LiveVip Call Girls Noida ➡️ Delhi ➡️ 9999965857 No Advance 24HRS Live
Vip Call Girls Noida ➡️ Delhi ➡️ 9999965857 No Advance 24HRS Live
 

Test Driven Development

  • 1.
  • 2. Content  What is TTD? Unit Test & Refactoring Got Bugs? Tenets of TTD. Benifits of TDD. Advantages & Disadvantages of TDD.
  • 3. What is TDD?  It is just about writing the test before the program. It’s a testing technique as well as a design Technique. In the end, there is no code without a test. The developer can tell at any time. Unit Tests and Refactoring are the tools of TDD.
  • 4. Unit Tests  Easy to read & understand. Execute very quickly. Independent of execution order. Test specific aspects of a functionality. Tests a very small section of code isolation. Rapid feedback.
  • 5. Refactoring  Take existing code & change it more efficient. Change the internal structure of code without changing its external behavior. Ex :- •ab + ac = a(b+c) Same result, but the expression is simplified.
  • 6. Start Write a test for new capability Compile Fix compile errors Run the testRun the test And see it failAnd see it fail Write the code Run the testRun the test And see it passAnd see it pass RefactorRefactor as neededas needed Red/Green/Refactor
  • 7. Got bugs?  Go after defect.  Writing a test to expose it.. Write code needed to fix it. Refactor. Repeat. Measure the result.
  • 8. Tenets of TDD  Split work into small requirements.  Always start by writing a test. Eliminate duplication. Write the simple code to pass the test.
  • 9. What can test by TDD?  Valid inputs.  Invalid inputs. Errors, exceptions and events. Boundary conditions.
  • 10. Benefits for Developers  Much less debug time.  Code proven to meet requirement. Test become Safety Net. Process consulting. Project mentoring. Eliminate bugs.
  • 11. Benefits for Business  Shorter development cycles.  Near zero defect. Test become an asset. Test are documentation. Competitive advantage.
  • 12.  Gets running code very quickly. Development in small steps. This will make debugging easier since we will have small code chunks to debug. Produce fully testable code. Design to the specification, don’t over engineer. Advantages
  • 13.  “Write test, write code to pass test, repeat” loop is overly strict. Setup requires some what complex wiring. Causes people to take paths they wouldn’t otherwise. Disadvantages
  • 14. References  “Test-Driven Development By Example”; Kent Beck;2003. “Refactoring, Improving The Design Of Existing Code”; Martin Fowler;1999. “Patterns Of Enterprise Application Architecture”; Martin Fowler;2003.

Editor's Notes

  1. Unit test levels Red 􀂄 Write a little test that doesn‘t work (and perhaps doesn‘t even compile at first). Green 􀂄 Make the test work quickly (committing whatever sins necessary) Refactor 􀂄 Eliminate all of the duplication created in merely getting the test to work, improve the design.
  2. TDD makes you produce 100% testable code You won’t spend a long time with non-running code Your code will always meet the design specifications