The Design of Software (CLOSED)

A public forum for discussing the design of software, from the user interface to the code architecture. Now closed.

The "Design of Software" discussion group has been merged with the main Joel on Software discussion group.

The archives will remain online indefinitely.

TDD for 1 man

Hi

I have no or little experience with unit testing or test driven development. Yet I'm considering if I should jump on the wagon and start using just unit tests or start doing TDD.
The project has not yet been started, so I guess TDD would be easier and more beneficial that if the project was already being worked on.
But how much would TDD help me as I'm just a team of one? As I understand it TDD and other agile methods works best in a team, but maybe I'm wrong?

What's you experience?
Karsten Send private email
Wednesday, November 21, 2007
 
 
I work on my own and all production code is Test Driven. It has to be to provide me with confidence that the product is of a high quality. I have limited time so it makes sense to avoid introducing bugs now rather than fix them later.

TDD with c#, NUnit, NMock2, NCover and TestDriven.net (addin) is incredibly quick and addictive. Couple all that with continuous interation (CruiseControl.net) and you'll be sorted.

TDD isn't a team thing, and remember the quality of your production code is only as good as the quality of your unit tests.
Mike
Thursday, November 22, 2007
 
 
I can second Mike's experience. We have two developers, and adopted TDD just under a year ago. Since then, we've seen a marked reduction in reported bugs, and an increase in repeatability within our codebase.

Coupled with CruiseControl.NET it's a real winner (you can even run CC.NET on a laptop if you are mobile, and CCNET will  ensure your tests stay green).

I'd strongly recommend the combination of TDD and continuous integration for ANY developer - even if you are working alone.
Anna-Jayne Metcalfe Send private email
Thursday, November 22, 2007
 
 
Thank you for your replies, but now I'm even more confused :-)
I really believed that continuous integration was only useful when developing in a team? I have probably don't understand CI. I'm thinking it's a way to ensure that code in the source version system is always good.
How can only one developer benefit from CI?
Karsten Send private email
Thursday, November 22, 2007
 
 
Because CI can do much more than just run your unit tests. I use it to run various types of integration tests after running the unit tests, run fxcop, and build config files. On longer (nightly) builds it also builds docs and an installer and runs tests against it, etc
Mike
Thursday, November 22, 2007
 
 
Running just your unit tests from TDD will test the units of your code, not the complete product.
Mike
Thursday, November 22, 2007
 
 
Thanks a lot Make for your reply!
I'm also a C# guy, do you know of any great places to start reading about TDD and CI for .Net / C# developers?

Thanks again
Karsten Send private email
Thursday, November 22, 2007
 
 
I'm a 1 person team and I recently starting to use TDD and continuous integration. The amount of puzzling bugs that I've dealt with since then has dropped by over 90%.

Here are a few resources:
1) http://www.pragprog.com/titles/utc2
This is THE book to read if you are new to unit testing, especially for .NET.

2) Expert .NET Delivery Using NAnt and CruiseControl.NET (Expert's Voice in .Net)
This book was VERY dry and hard to read, but it does let you know the steps to set up and use CruiseControl.NET

3) Finally I used VisualBuilder (http://www.visualbuilder.com) instead of CruiseControl.NET. Instead of scripting everything, you just use a UI. Further VisualBuilder is integrated with nearly every tool under the sun.
Praveen Angyan Send private email
Thursday, November 22, 2007
 
 
Whoops I meant FinalBuilder (www.finalbuilder.com).
Praveen Angyan Send private email
Thursday, November 22, 2007
 
 
To Praveen Angyan

Thanks for your reply. I used FinalBuilder 1 or 2 years ago, so I might be up to date onthis, but doesn't nant and FinalBuilder do the same thing? FinalBuilder beeing visual and nant uses scripts?
Karsten Send private email
Friday, November 23, 2007
 
 
> doesn't nant and FinalBuilder do the same thing?

Maybe they do.  FB was so easy to learn and use it was worth the $$ for me.
Mark Jerde Send private email
Friday, November 23, 2007
 
 
I would like to second the above.

In a sense I find "automated unit tests" in general are essential for the 1 man band than a team because you simply don't have the spare time to track down the issues!

In a larger team you will typically have a separate test team as well who will fill those gaps and perform the vigorous testing. For the 1 man band you need the automated test simply so you can move forwards.

I adopted TDD a couple of years ago and when I skimp on it I pay the price (in time).

I also run "functional" tests for my desktop apps because again, before a release I want to verify everything quickly. It does take time but pays off in the long run by far.
Paul Kohler Send private email
Wednesday, November 28, 2007
 
 

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics
 
Powered by FogBugz