1 / 14

PRESENTORS : SUSHMA K.C. MANZIL BHUJEL NIVA RAJKARNIKAR

A PRESENTATION ON TEST DRIVEN DEVELOPMENT. PRESENTORS : SUSHMA K.C. MANZIL BHUJEL NIVA RAJKARNIKAR. INTRODUCTION. What is Test Driven Development (TDD)?. TDD is one of the core practices of Extreme Programming using the test-first programming concepts.

Download Presentation

PRESENTORS : SUSHMA K.C. MANZIL BHUJEL NIVA RAJKARNIKAR

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. A PRESENTATION ON TEST DRIVEN DEVELOPMENT PRESENTORS : SUSHMA K.C. MANZIL BHUJEL NIVA RAJKARNIKAR

  2. INTRODUCTION • What is Test Driven Development (TDD)? • TDD is one of the core practices of Extreme Programming • using the test-first programming concepts. • TDD is a technique whereby you write your test cases before • you write any implementation code • Tests drive or dictate the code that is developed and provides a • specification of what a code exactly does.

  3. Test Cases/Codes • In TDD, before you write code, you must think about what it will • do. • Write a test that will use the methods you haven’t even written yet • A test is not something you “do”, it is something you “write” • and run once, twice, three times, etc. • It is a piece of code • Testing is therefore “automated” • Repeatedly executed, even after small changes

  4. Instead of writing functional code first and then testing it, in TDD the team writes the test code before the functional code. You do not need to have a well-defined architectural design in TDD before beginning the development phase. The functional code in TDD addresses all of the requirements, without including unnecessary functionality. TRADITIONAL AND TEST DRIVEN DEVELOPMENT DIFFERENCES

  5. How to implement a test driven development model?

  6. Create the test code Write/Modify the functional code Create additional tests Test the functional code Refactor the code Steps inTest-Driven Development

  7. Use an automated test framework to create the test code. Create the test code before any code is written for the functionality of the application block. Write a test case for each code requirement so that the test cases have an execution result of "pass.“ Avoid writing code for multiple test cases at any one time. Create the test code

  8. Develop functionality that passes the test cases that were created. In the first iteration, in all probability the test code will not compile and you can assume that it failed. Modify the functionality until all of the existing test case have an execution result of "pass." 2. Write or Modify the Functional Code

  9. The functionality that passed the test case is now tested for various types of input. Create additional tests that could possibly break the code Write test cases that focus on the goal of the code Avoid writing separate test cases for each unique combination of input. 3. Create Additional Tests

  10. Test the functionality by using the additional test cases. Make changes to the functional code so that it passes all of the existing test cases. Repeat until the testers can no longer create additional test cases that break the functionality of the code. 4. Test the Functional Code

  11. The developers refactor the code to make it maintainable and extensible. Refactoring removes duplicate code and can reduce code complexity. Refactoring codes timely reduces code redundancy . It helps in optimizing the design. 5. Refactor the Code

  12. ADVANTAGES • Loosely coupled and highly cohesive code, because the • functionality is evolved in small steps • The test suite acts as documentation for the functional • specification of the final system. • The system uses automated tests, which significantly reduce • the time taken to retest the existing functionality for each new • build of the system.

  13. By using test-driven development, you can ensure that each feature of an application block is rigorously tested early in the project life cycle. Early testing significantly reduces the risk of costly fixes and delays later in the life cycle. It ensures a robust application block that meets all of the feature requirements. CONCLUSION

  14. THANK YOU!!!

More Related