test driven development part 1
DESCRIPTION
TDD benefits Clean Design Fast Feedback Concrete Evidence That Your Software Works Write Better Code Reduced Gold-Plating Regression Test Suite How To Do TDD Analyze the requirements and write the list of tasks or features Pick a task or feature Brainstorm a list of tests for the task or feature Review the tests list and pick a test Write the test case Run the test case and see it fails to compile Write only enough code that the test case compiles Run the test and see running the code fails Write only enough code to just pass the test Refactor the production code and eliminate duplication RepeatTRANSCRIPT
![Page 1: Test Driven Development Part 1](https://reader035.vdocument.in/reader035/viewer/2022070303/54b6ce324a7959d84d8b45ac/html5/thumbnails/1.jpg)
Test Driven Test Driven DevelopmentDevelopment
Part 1Gamal Shaaban Gamal Shaaban International CentersOrange Labs CairoMobile Applications & Software Development
![Page 2: Test Driven Development Part 1](https://reader035.vdocument.in/reader035/viewer/2022070303/54b6ce324a7959d84d8b45ac/html5/thumbnails/2.jpg)
Orange presentation
Questions?
![Page 3: Test Driven Development Part 1](https://reader035.vdocument.in/reader035/viewer/2022070303/54b6ce324a7959d84d8b45ac/html5/thumbnails/3.jpg)
3 Orange restricted
Fact?
![Page 4: Test Driven Development Part 1](https://reader035.vdocument.in/reader035/viewer/2022070303/54b6ce324a7959d84d8b45ac/html5/thumbnails/4.jpg)
4 Orange restricted
Session-1Session-1
4
• Why TDD• Quality In Time and Cost• Cost To Change
• Steps To TDD• Red Green Refactor Cycle• Write Red Test• Write Green Code• Do Refactoring Code
![Page 5: Test Driven Development Part 1](https://reader035.vdocument.in/reader035/viewer/2022070303/54b6ce324a7959d84d8b45ac/html5/thumbnails/5.jpg)
5 Orange restricted
Why TDD: Quality TriangleWhy TDD: Quality Triangle
• TDD benefits
o Clean Designo Fast Feedbacko Concrete Evidence That
Your Software Workso Write Better Codeo Reduced Gold-Platingo Regression Test Suite
5
![Page 6: Test Driven Development Part 1](https://reader035.vdocument.in/reader035/viewer/2022070303/54b6ce324a7959d84d8b45ac/html5/thumbnails/6.jpg)
6 Orange restricted
Cost To Change ChartCost To Change Charthttp://www.agilemodeling.com/essays/costOfChange.htm
6
![Page 7: Test Driven Development Part 1](https://reader035.vdocument.in/reader035/viewer/2022070303/54b6ce324a7959d84d8b45ac/html5/thumbnails/7.jpg)
7 Orange restricted
Steps To TDDSteps To TDD
7
![Page 8: Test Driven Development Part 1](https://reader035.vdocument.in/reader035/viewer/2022070303/54b6ce324a7959d84d8b45ac/html5/thumbnails/8.jpg)
8 Orange restricted
Red Green Refactor Red Green Refactor CycleCycle
![Page 9: Test Driven Development Part 1](https://reader035.vdocument.in/reader035/viewer/2022070303/54b6ce324a7959d84d8b45ac/html5/thumbnails/9.jpg)
9 Orange restricted
Write fail tests, make test passes, refactor your code, repeat this action
9
![Page 10: Test Driven Development Part 1](https://reader035.vdocument.in/reader035/viewer/2022070303/54b6ce324a7959d84d8b45ac/html5/thumbnails/10.jpg)
10 Orange restricted
How To Do TDDHow To Do TDD
1. Analyze the requirements and write the list of tasks or features
2. Pick a task or feature
3. Brainstorm a list of tests for the task or feature
4. Review the tests list and pick a test
5. Write the test case
6. Run the test case and see it fails to compile
7. Write only enough code that the test case compiles
8. Run the test and see running the code fails
9. Write only enough code to just pass the test
10.Refactor the production code and eliminate duplication
11.Repeat
10
![Page 11: Test Driven Development Part 1](https://reader035.vdocument.in/reader035/viewer/2022070303/54b6ce324a7959d84d8b45ac/html5/thumbnails/11.jpg)
11 Orange restricted
![Page 12: Test Driven Development Part 1](https://reader035.vdocument.in/reader035/viewer/2022070303/54b6ce324a7959d84d8b45ac/html5/thumbnails/12.jpg)
12 Orange restricted
![Page 13: Test Driven Development Part 1](https://reader035.vdocument.in/reader035/viewer/2022070303/54b6ce324a7959d84d8b45ac/html5/thumbnails/13.jpg)
13 Orange restricted
![Page 14: Test Driven Development Part 1](https://reader035.vdocument.in/reader035/viewer/2022070303/54b6ce324a7959d84d8b45ac/html5/thumbnails/14.jpg)
14 Orange restricted
![Page 15: Test Driven Development Part 1](https://reader035.vdocument.in/reader035/viewer/2022070303/54b6ce324a7959d84d8b45ac/html5/thumbnails/15.jpg)
15 Orange restricted
![Page 16: Test Driven Development Part 1](https://reader035.vdocument.in/reader035/viewer/2022070303/54b6ce324a7959d84d8b45ac/html5/thumbnails/16.jpg)
Orange presentation
Questions?
![Page 17: Test Driven Development Part 1](https://reader035.vdocument.in/reader035/viewer/2022070303/54b6ce324a7959d84d8b45ac/html5/thumbnails/17.jpg)
thanks