Test-Driven Development is a paradigm shift with its novel approach to software development. It puts the fun back in development, while improving quality and end-user satisfaction.
Unit testing is one of the cornerstones in agile development. A comprehensive suite of automatic tests for your source code generates many benefits. Your confidence in modifying the source code will skyrocket because you know that if you unintentionally
But this is just the first step. By writing a test for a new feature before the actual implementation,
The technique I described above is called Test-Driven Development (TDD) and is steadily gaining popularity. It stems from one of twelve extreme programming practices, and many friends and colleagues to whom I introduced it swear by TDD today. The main benefit gained from a test-driven approach is that you are approaching the solution from the top, from the user’s perspective.
Too many potential killer apps are destroyed by programmers who develop bottom up. When it comes to designing the interface (like a GUI or API), they find themselves tied down to their early ill-informed low-level design choices. By doing TDD you will let the requirements drive the development. As a positive side-effect it is a thrill to develop software this way, you are always focused on reaching one specific goal, usually not that far away. It is difficult to lose focus on what you are out to accomplish in the source code while trying to get a test to pass.
Automatic tests can also be used to specify programming assignments. You hand your colleague a set of tests that lack implementation and ask him to implement the required classes so that the tests will pass.
So how do you do this in practice? Well, if I were you I would head straight over to xUnit’s Wikipedia entry where free tools are available for almost any language/platfo