Tuesday 3 December 2013

Dealing with Bugs in Test Driven Development(TDD)

Although defect rates can be lower when using TDD, you will still create bugs. These should be corrected with the same three-phase iterations, Red, Green and Refactor. First you create one or more tests that demonstrate the bug by validating the correct behaviour. These tests should fail. Next you fix the code to make the test pass, performing regression testing by executing all of the tests. Once the bug is fixed, you should perform any appropriate refactoring to keep the code clean and readable.

Related articles

What is TDD?

TDD Process

Dealing with bugs in TDD

No comments:

Post a Comment