Skip to content

Introduction to Test Driven Development (TDD)

Modern projects, are attached new methodologies, on my current project we are implementing TDD, Test Driven Development, we expect to achieve a 70% time win on project, and a bug fix time reduction of 50%.

What is Test Driven Development ?

“Test-Driven Development (TDD) is a software development technique consisting of short iterations where new test cases covering the desired improvement or new functionality are written first, then the production code necessary to pass the tests is implemented, and finally the software is refactored to accommodate changes. The availability of tests before actual development ensures rapid feedback after any change. Practitioners emphasize that test-driven development is a method of designing software, not merely a method of testing.”


Test Driven Development Workflow

1. Add a test
2. Run all tests and see the new one fail
3. Write some code
4. Run the automated tests and see them succeed
5. Refactor code

Three suggestions for a productive TDD Cycle

1. Write only code if one test fails
2. Write only tests enough to make the execution fail
3. Write only enough code to pass the test

Interesting links about TDD

Coming next: PHP And Test Driven Development

Be First to Comment

Leave a Reply

Your email address will not be published. Required fields are marked *