preview

Pros And Cons Of Test Driven Design

Good Essays

Test Driven Design: Pros and Cons

Software testing involves execution of a software or service to check the quality of software product or service. It evaluates whether software components meet the given requirements or not. It also evaluates functionality of the software and time taken by it to run. [1] Software testing is very important for controlling the cost of the software project. Traditionally, we design and develop the program first. However, Test Driven Design (TDD) involves writing the test cases for new functions of a software first and then implementation of the code to pass these tests. This cycle of writing test cases and implementing the code is repeated till all the functionalities of the code are implemented. [2] Now, we …show more content…

Actually, in TDD he first writes 1 small test, then he writes the code which passes that test case, then write another small test and then make it work and so on. [3] “This is the basic flow of TDD. Write a test that fails, make it work, improve the code.” [3] This flow is also known as Red-Green-Refactor flow. Writing a test that fails indicate red phase, making it work indicate green phase and improving the code refers to refactor phase in the practice of test driven design. [3] Refactoring means to change the code without changing the expected goal of the code. This practice may not seem natural but yields very fruitful benefits.
There are many advantages of using test driven design in a software company. In many companies, including IBM, traditional unit test is not thought of as an important step in software development. “More often than not, no unit tests were created, especially when the schedule is tight.” [2] While in TDD, this is not the case as in its development process testing is forced through the test cases made. This causes the software product to eventually have less

Get Access