Asp – Should I Use TDD

asp.net-mvcnettdd

I'm the only developer in my (very small) company and I'm about to start on a medium sized ASP.NET web application for said company.

I'm trying to figure out if I should learn Test Driven Development (TDD) and implement it in this application.

I need to start developing our new application shortly and I'm worried about testing. I've programmed for many years but have never done any unit testing.

I've read numerous online resources regarding TDD but I'm unsure whether I'll have a 'good enough' grasp on it to make it effective in the application.

Best Answer

It depends on where your priorities lie. If you're interested in furthering yourself as a developer, TDD is definitely worth looking into if only for the experience. It'll help you rethink the way you code and probably make you a better developer because of it.

But that could easily be outweighed by how much TDD hampers your ability to get your product out in a timely manner. You mentioned that you're the only developer working at this company and that means that the pressure is on you to get your project done. TDD is certainly a great practice, but sometimes real life constraints and practicality must come first.

So in short, if you can spare the time then yes, use TDD. It's actually not that much overhead and you can always skip the testing in a pinch. But if you're really strapped for time and don't think you'll be able to incorporate it without putting your product and job at risk, nobody would fault you for skipping it. The purists will disagree, but it's not a black and white world and sometimes compromises must be made to get things done.