If you've heard of Test Driven Development (TDD) before but was not sure what it was or how it works, this newsletter provides a summary of the approach.
What is Test Driven Development?
Test Driven Development is a unique way to develop software by starting the process by collecting a requirement, developing test cases for the requirement, followed by the coding process. For traditional development and testing shops, this process "feels backwards" because traditional approaches perform the coding before beginning testing. However, this approach has been used for years by Agile Development teams.
So how does it Work?
For TDD to work, create your test cases using an automated testing tool and then write the code that causes the automated test(s) to pass. So here are the steps:
What are the Advantages of TDD?
- First fully understand the requirement
- Create automated test(s) that test the requirement
- Create the coding logic -- test it by running the automated test(s)
- Once the automated test(s) pass, the coding then fulfills the requirement
- Re-factor the code for better maintainability, run the automated test(s) again to ensure it still works
Studies have shown that Test Driven Development reduces defect density, improves software quality, and in some cases make team productivity higher. Empirical Software Engineering Journal published a paper that summarized 4 cases studies (1 at IBM, 3 at Microsoft), where they followed the TDD practice and evaluated the effectiveness of it. For more information on this study, visit http://www.infoq.com/news/2009/03/TDD-Improves-Quality.
Below are some helpful resources and templates to aid you in developing software solutions:
http://www.SoftwarePlanner.com TestComplete (Automated Testing Tool) - http://www.TestComplete.com Software Development /QA Templates -http://www.softwareplanner.com/Templates.asp Test Case Training - http://www.SoftwarePlanner.com/Services.asp Pragmatic Agile Development - http://www.softwareplanner.com/PADOverview.pdf