Why TDD is hard?

Test Driven Development is not about testing – it’s about the design. It is worth to remember that the idea of preparing tests first is difficult if You are preapring… tests. It is much easier when You see it as a design requirements. After that, You test if design requirements are met by software. Not only test the if the software works correctly itself.

Tests are prepared first, then the software is written. The goal is to design software in detail so that test cases check if software meets requirements.

This is new way of thinking about software that is in common with Agile methodology. Software is created from the users’ point of view. First You define (in tests) how software has to look like and work, then just implement it so that all the test cases are fulfilled. There is no doubt that this is the right approach.

The problem is that writing the tests, developer does not write software itself, but give his time to other tasks. The clue is to believe that this will save time and resources in future – simply by limiting the amount of bugs that would consume developer’s time if not discovered in early phase with TDD.

It is not easy to write tests that will reveal all bugs, but spending more time on particular part of software code increases its quality itself.  I still did not managed skill of writing test ahead of software, but I am doing my best!

Give Your feedback: