SlideShare a Scribd company logo
1 of 21
Test-Driven Development by John Blanco
The process of designing software by writing a validating client before the code.  What is Test-Driven Development (TDD)? Maintaining an evolving set of unit tests that continuously validate the correctness (or not) of your code.  What is Automated Unit Testing?
Automated Unit Testing != Test-Driven Development TDD is a way of thinking about your code, but it doesn’t require unit testing.  That being said, you should write them if you can.  Agile processes adapt to change.  Unit tests help to manage change in our code.  Unit Testing is a key component of the Agile Methodology
Dispelling Unit Testing Myths
No.   Writing unit tests is an investment towards time savings over the lifetime of the project. Myth #1:  Won’t writing unit tests double by development time? ,[object Object],[object Object],[object Object]
No.   Unit tests are not parallel to your code like documentation.  You will be  driving  your code with them. Myth #2:  Won’t all my unit tests just get out of date? ,[object Object],[object Object],[object Object]
No.   The client is paying for clean, correct code.  Unit testing is the means to that end. Myth #3:  Won’t the client refuse to pay for it? ,[object Object],[object Object],[object Object]
xUnit is the framework for automating our unit tests. Implementations exist for C++, C#, Java, PHP, Ruby, Python, Perl, Prolog, LISP, … and Flex!  Created by Erich Gamma, member of the GoF and co-author of Eclipse JDT. Introducing xUnit!
FlexUnit is the Flex implementation of xUnit. FlexUnit ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Don’t worry.  Chances are, you’re already writing unit tests!  Whoa! Whoa! Hold On -- This Seems Excessive!
<mx:Application creationComplete=“onCreationComplete()”> <mx:Script> private function onCreationComplete():void { // DEVELOPMENT ONLY - REMOVE LATER var htmlMaker:MyHTMLMaker = new MyHTMLMaker(); htmlMaker.startTag(“b”); htmlMaker.addContent(“My bold text!!!”); htmlMaker.endTag(); trace(“RESULT: ” + htmlMaker.toString()); } </mx:Script> . . . </mx:Application> Ever Write Code Like This…And Then Delete It Afterwards?
Fool!   The problem is that you’re not anticipating CHANGE.  When that happens, you will need to modify and test your code all over again. What if we kept that test? Yes!  And then once I verify it’s working, I remove it. So?
[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],Setting Up Your Project For TDD  http://raptureinvenice.blogspot.com/2008/04/better-way-to-set-up-flexunit.html Reference:
[object Object],[object Object],[object Object],[object Object],[object Object],Setting Up Your Project For TDD  http://code.google.com/p/as3flexunitlib/ References: http://raptureinvenice.blogspot.com/2008/04/better-way-to-set-up-flexunit.html
Working Session
Wait!  We Need a Change!
What Have We Accomplished?
Gain #1:  We have a clean, stable piece of code ,[object Object],[object Object],[object Object],[object Object]
Gain #2:  We will feel confident making changes to the code ,[object Object],[object Object],Because what is the one constant in software development? CHANGE.
[object Object],[object Object],[object Object],[object Object],[object Object],A Newer Flex Testing Framework: dpuint
Questions?

More Related Content

What's hot

Test Driven Development
Test Driven DevelopmentTest Driven Development
Test Driven Development
bhochhi
 
Code Review
Code ReviewCode Review
Code Review
rantav
 
Test driven developement
Test driven developementTest driven developement
Test driven developement
Bhavik Panchal
 
TDD - Test Driven Development
TDD - Test Driven DevelopmentTDD - Test Driven Development
TDD - Test Driven Development
Lim Chanmann
 

What's hot (16)

Code review process with JetBrains UpSource
Code review process with JetBrains UpSourceCode review process with JetBrains UpSource
Code review process with JetBrains UpSource
 
Civilized Git Process
Civilized Git ProcessCivilized Git Process
Civilized Git Process
 
TDD and Simple Design Workshop - Session 1 - March 2019
TDD and Simple Design Workshop - Session 1 - March 2019TDD and Simple Design Workshop - Session 1 - March 2019
TDD and Simple Design Workshop - Session 1 - March 2019
 
Tdd
TddTdd
Tdd
 
Test Driven Development
Test Driven DevelopmentTest Driven Development
Test Driven Development
 
Behaviour Driven Development with SpecFlow
Behaviour Driven Development with SpecFlowBehaviour Driven Development with SpecFlow
Behaviour Driven Development with SpecFlow
 
Code Review
Code ReviewCode Review
Code Review
 
Bdd and spec flow
Bdd and spec flowBdd and spec flow
Bdd and spec flow
 
TDD Basics with Angular.js and Jasmine
TDD Basics with Angular.js and JasmineTDD Basics with Angular.js and Jasmine
TDD Basics with Angular.js and Jasmine
 
“One man” development process model
“One man” development process model“One man” development process model
“One man” development process model
 
Test driven development vs Behavior driven development
Test driven development vs Behavior driven developmentTest driven development vs Behavior driven development
Test driven development vs Behavior driven development
 
SCM Process and smartBuild
SCM Process and smartBuildSCM Process and smartBuild
SCM Process and smartBuild
 
Test driven developement
Test driven developementTest driven developement
Test driven developement
 
Dot all 2019 | Testing with Craft | Giel Tettelar
Dot all 2019 | Testing with Craft | Giel TettelarDot all 2019 | Testing with Craft | Giel Tettelar
Dot all 2019 | Testing with Craft | Giel Tettelar
 
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
 
TDD - Test Driven Development
TDD - Test Driven DevelopmentTDD - Test Driven Development
TDD - Test Driven Development
 

Viewers also liked

Life In The Tundralanzillotta
Life In The TundralanzillottaLife In The Tundralanzillotta
Life In The Tundralanzillotta
Michelle McGinnis
 
物件導向程式設計課程講義(98 ges hi版)
物件導向程式設計課程講義(98 ges hi版)物件導向程式設計課程講義(98 ges hi版)
物件導向程式設計課程講義(98 ges hi版)
Hui-Shih Leng
 
#Mrec September 24 2013 Keynote
#Mrec September 24 2013 Keynote #Mrec September 24 2013 Keynote
#Mrec September 24 2013 Keynote
Rob Humphrey
 
2009-10-21 Presentation at media and analyst meeting
2009-10-21 Presentation at media and analyst meeting2009-10-21 Presentation at media and analyst meeting
2009-10-21 Presentation at media and analyst meeting
Axfood
 
Search Deltawateren oogst flip-overs
Search Deltawateren oogst flip-oversSearch Deltawateren oogst flip-overs
Search Deltawateren oogst flip-overs
Leo Brand van den
 
The Great Tundra Project Tan
The Great Tundra Project TanThe Great Tundra Project Tan
The Great Tundra Project Tan
Michelle McGinnis
 
My Arctic Tundra Project!Custer
My Arctic Tundra Project!CusterMy Arctic Tundra Project!Custer
My Arctic Tundra Project!Custer
Michelle McGinnis
 

Viewers also liked (20)

Ckv[1]
Ckv[1]Ckv[1]
Ckv[1]
 
Life In The Tundralanzillotta
Life In The TundralanzillottaLife In The Tundralanzillotta
Life In The Tundralanzillotta
 
物件導向程式設計課程講義(98 ges hi版)
物件導向程式設計課程講義(98 ges hi版)物件導向程式設計課程講義(98 ges hi版)
物件導向程式設計課程講義(98 ges hi版)
 
#Mrec September 24 2013 Keynote
#Mrec September 24 2013 Keynote #Mrec September 24 2013 Keynote
#Mrec September 24 2013 Keynote
 
URA Task Force - PDNA
URA Task Force - PDNAURA Task Force - PDNA
URA Task Force - PDNA
 
Ringling college
Ringling collegeRingling college
Ringling college
 
RTB
RTBRTB
RTB
 
Axfood Q12009 En
Axfood Q12009 EnAxfood Q12009 En
Axfood Q12009 En
 
Portfolio
PortfolioPortfolio
Portfolio
 
Ckv[1]
Ckv[1]Ckv[1]
Ckv[1]
 
Itb Chap 16
Itb Chap 16Itb Chap 16
Itb Chap 16
 
Oslo Enterprise MeetUp May 12th 2010 - Jan Høydahl
Oslo Enterprise MeetUp May 12th 2010 - Jan HøydahlOslo Enterprise MeetUp May 12th 2010 - Jan Høydahl
Oslo Enterprise MeetUp May 12th 2010 - Jan Høydahl
 
2009-10-21 Presentation at media and analyst meeting
2009-10-21 Presentation at media and analyst meeting2009-10-21 Presentation at media and analyst meeting
2009-10-21 Presentation at media and analyst meeting
 
Search Deltawateren oogst flip-overs
Search Deltawateren oogst flip-oversSearch Deltawateren oogst flip-overs
Search Deltawateren oogst flip-overs
 
Frokostseminar mai 2010 solr open source cominvent as
Frokostseminar mai 2010 solr open source cominvent asFrokostseminar mai 2010 solr open source cominvent as
Frokostseminar mai 2010 solr open source cominvent as
 
Axfood Annual general meeting 2014
Axfood Annual general meeting 2014Axfood Annual general meeting 2014
Axfood Annual general meeting 2014
 
The Great Tundra Project Tan
The Great Tundra Project TanThe Great Tundra Project Tan
The Great Tundra Project Tan
 
v2 3rd (11-13 June 2015) KNH and UON Conference-Research as a Driver for Scie...
v2 3rd (11-13 June 2015) KNH and UON Conference-Research as a Driver for Scie...v2 3rd (11-13 June 2015) KNH and UON Conference-Research as a Driver for Scie...
v2 3rd (11-13 June 2015) KNH and UON Conference-Research as a Driver for Scie...
 
My Arctic Tundra Project!Custer
My Arctic Tundra Project!CusterMy Arctic Tundra Project!Custer
My Arctic Tundra Project!Custer
 
Determinants of host susceptibility in aggressive periodontitis+Conference+Pr...
Determinants of host susceptibility in aggressive periodontitis+Conference+Pr...Determinants of host susceptibility in aggressive periodontitis+Conference+Pr...
Determinants of host susceptibility in aggressive periodontitis+Conference+Pr...
 

Similar to Test Driven Development

Agile Development Ultimate Slides
Agile Development Ultimate SlidesAgile Development Ultimate Slides
Agile Development Ultimate Slides
gilashikwa
 

Similar to Test Driven Development (20)

Why test with flex unit
Why test with flex unitWhy test with flex unit
Why test with flex unit
 
Test driven development
Test driven developmentTest driven development
Test driven development
 
Test-Driven Development In Action
Test-Driven Development In ActionTest-Driven Development In Action
Test-Driven Development In Action
 
Test-Driven Developments are Inefficient; Behavior-Driven Developments are a ...
Test-Driven Developments are Inefficient; Behavior-Driven Developments are a ...Test-Driven Developments are Inefficient; Behavior-Driven Developments are a ...
Test-Driven Developments are Inefficient; Behavior-Driven Developments are a ...
 
Agile Development Ultimate Slides
Agile Development Ultimate SlidesAgile Development Ultimate Slides
Agile Development Ultimate Slides
 
TDD Workshop UTN 2012
TDD Workshop UTN 2012TDD Workshop UTN 2012
TDD Workshop UTN 2012
 
Should you be your own judge?
Should you be your own judge?Should you be your own judge?
Should you be your own judge?
 
Automated Unit Testing and TDD
Automated Unit Testing and TDDAutomated Unit Testing and TDD
Automated Unit Testing and TDD
 
Topic production code
Topic production codeTopic production code
Topic production code
 
xUnit and TDD: Why and How in Enterprise Software, August 2012
xUnit and TDD: Why and How in Enterprise Software, August 2012xUnit and TDD: Why and How in Enterprise Software, August 2012
xUnit and TDD: Why and How in Enterprise Software, August 2012
 
Software Development Standard Operating Procedure
Software Development Standard Operating Procedure Software Development Standard Operating Procedure
Software Development Standard Operating Procedure
 
TDD - Agile
TDD - Agile TDD - Agile
TDD - Agile
 
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
 
Introducing Continuous Integration Using Vsts
Introducing Continuous Integration Using VstsIntroducing Continuous Integration Using Vsts
Introducing Continuous Integration Using Vsts
 
Test driven development
Test driven developmentTest driven development
Test driven development
 
assertYourself - Breaking the Theories and Assumptions of Unit Testing in Flex
assertYourself - Breaking the Theories and Assumptions of Unit Testing in FlexassertYourself - Breaking the Theories and Assumptions of Unit Testing in Flex
assertYourself - Breaking the Theories and Assumptions of Unit Testing in Flex
 
Test Driven Development and Automation
Test Driven Development and AutomationTest Driven Development and Automation
Test Driven Development and Automation
 
Continuous integration
Continuous integrationContinuous integration
Continuous integration
 
AAA Automated Testing
AAA Automated TestingAAA Automated Testing
AAA Automated Testing
 
Managing and evolving JavaScript Code
Managing and evolving JavaScript CodeManaging and evolving JavaScript Code
Managing and evolving JavaScript Code
 

Recently uploaded

Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
panagenda
 
Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native Applications
WSO2
 

Recently uploaded (20)

DBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor PresentationDBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor Presentation
 
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
 
Navi Mumbai Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Navi Mumbai Call Girls 🥰 8617370543 Service Offer VIP Hot ModelNavi Mumbai Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Navi Mumbai Call Girls 🥰 8617370543 Service Offer VIP Hot Model
 
AXA XL - Insurer Innovation Award Americas 2024
AXA XL - Insurer Innovation Award Americas 2024AXA XL - Insurer Innovation Award Americas 2024
AXA XL - Insurer Innovation Award Americas 2024
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
 
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingRepurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of Terraform
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...
 
A Beginners Guide to Building a RAG App Using Open Source Milvus
A Beginners Guide to Building a RAG App Using Open Source MilvusA Beginners Guide to Building a RAG App Using Open Source Milvus
A Beginners Guide to Building a RAG App Using Open Source Milvus
 
ICT role in 21st century education and its challenges
ICT role in 21st century education and its challengesICT role in 21st century education and its challenges
ICT role in 21st century education and its challenges
 
GenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdfGenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdf
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
 
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
 
MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024
 
Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native Applications
 
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodPolkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
 

Test Driven Development

  • 2. The process of designing software by writing a validating client before the code. What is Test-Driven Development (TDD)? Maintaining an evolving set of unit tests that continuously validate the correctness (or not) of your code. What is Automated Unit Testing?
  • 3. Automated Unit Testing != Test-Driven Development TDD is a way of thinking about your code, but it doesn’t require unit testing. That being said, you should write them if you can. Agile processes adapt to change. Unit tests help to manage change in our code. Unit Testing is a key component of the Agile Methodology
  • 5.
  • 6.
  • 7.
  • 8. xUnit is the framework for automating our unit tests. Implementations exist for C++, C#, Java, PHP, Ruby, Python, Perl, Prolog, LISP, … and Flex! Created by Erich Gamma, member of the GoF and co-author of Eclipse JDT. Introducing xUnit!
  • 9.
  • 10. Don’t worry. Chances are, you’re already writing unit tests! Whoa! Whoa! Hold On -- This Seems Excessive!
  • 11. <mx:Application creationComplete=“onCreationComplete()”> <mx:Script> private function onCreationComplete():void { // DEVELOPMENT ONLY - REMOVE LATER var htmlMaker:MyHTMLMaker = new MyHTMLMaker(); htmlMaker.startTag(“b”); htmlMaker.addContent(“My bold text!!!”); htmlMaker.endTag(); trace(“RESULT: ” + htmlMaker.toString()); } </mx:Script> . . . </mx:Application> Ever Write Code Like This…And Then Delete It Afterwards?
  • 12. Fool! The problem is that you’re not anticipating CHANGE. When that happens, you will need to modify and test your code all over again. What if we kept that test? Yes! And then once I verify it’s working, I remove it. So?
  • 13.
  • 14.
  • 16. Wait! We Need a Change!
  • 17. What Have We Accomplished?
  • 18.
  • 19.
  • 20.