Software is constantly evolving as the need of the users change. Since change is a constant, so is the risk of new bugs introduced by those changes. How could we raise the quality of our product, have a quick response to our users changing needs and keep our testing costs almost the same?
Let’s think now in a different scenario, where the product is already there and you need to maintain it. I think this may happened at least once to every developer I know. Projects were everything is such a mess that as soon as you get there you start doing some cleanup in the code and making proposals of improvement. The project have individual contributor all across the world and no architecture, there is no coding standard, no technical documentation or models, nobody really knows the application therefore nobody really knows the effect of a change on a piece of code and its consequences on the other modules.
The only way to technically enhance these projects is refactoring some modules of the application but this is rarely feasible, nor cost effective. The high cost of the refactoring lies in the amount of bugs it introduces on the application, this is not because the developers are lazy or careless is just human nature. What option do we have then? Well one is test driven development, what is this? Test-driven development (TDD) is a software development technique. The development is based on pre-written test cases that define the expected functionality. This allows having quality feedback as soon as the development starts. The steps of the methodology are as follows:
This methodology may be a platform for other practices such as continuous integration that give us even more value from our testing by providing a earlier detection of bugs. There are a variety of tools to facilitate the creation of the unit tests, among them JUnit, Visual Studio Team System, etc.