Basics of Test Driven Development (TDD)
Develop | Posted December 22, 2009

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:

  1. First fully understand the requirement
  2. Create automated test(s) that test the requirement
  3. Create the coding logic -- test it by running the automated test(s)
  4. Once the automated test(s) pass, the coding then fulfills the requirement
  5. Re-factor the code for better maintainability, run the automated test(s) again to ensure it still works
What are the Advantages of TDD?
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.

Helpful Resources
Below are some helpful resources and templates to aid you in developing software solutions:
  • Software Planner -
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
  • Close

    By submitting this form, you agree to our
    Terms of Use and Privacy Policy

    Thanks for Subscribing

    Keep an eye on your inbox for more great content.

    Continue Reading

    Add a little SmartBear to your life

    Stay on top of your Software game with the latest developer tips, best practices and news, delivered straight to your inbox