Cook Computing

I'm still working on unit

February 5, 2002 Written by Charles Cook

I'm still working on unit tests for XML-RPC.NET. I'm going to use NUnit when a .NET RTM version is released (hopefully fairly soon according to a posting from Philip Craig at the NUnit site). For the time being I'm writing test cases and calling them from hand-written code rather than automatically through the NUnit framework.

I'm new to this more structured approach to unit testing but its value has become obvious to me even though I'm not following the XUnit approach (I'm writing the tests after coding). I've already found several minor bugs and I can see how much more effective it would have been to be writing the tests at the same time as writing the code. By putting a structure around test case generation the XUnit approach makes it much easier to be more thorough in your testing. In the past I've typically written simple test harnesses as required but in a fairly casual way without a consistent mechanism for running the tests. They are usually not capable of being run automatically so tend to be run only sporadically.

I've just noticed that there is a COMUnit project. Since most of my day-to-day work is currently COM-based development this may also be worth investigating.