Thursday, November 23, 2006

Test Driven Development in .Net

I am sure every curious developer will be interested in learning about the test driven development (TDD) methodology. While developing a new software a software developer takes the approach of design and then coding. But TDD emphazies the opposite, stressing the need to prepare test cases even before writing the code. Take a look at this excellent article on how to learn the TDD for a sample project.

The author explains the advantage of using TDD and how to buildreusable test cases for a project. I have always been interested in implementing it for my previous project but the domain of the project (healthcare) and unrealistic deadlines for some of the projects made it really tough to implement the same. Creating the automated test cases in most cases will take more time than the actual coding itself. But I am sure I could have done a better job in some of the areas had I used TDD. Nunit is a great open source tool available for doing automated unit testing. So go ahead and try implementing TDD for your projects and let me know what you think about it.

1 comment:

Anonymous said...

I'm not an advocate of TDD, but I am an advocate of built-in unit tests. Not only are they useful for initial testing, they make maintenence much easier since some sort of regression test is always being done.

Self-tests are important even if you're not doing TDD.