Dan,

I think going back an writing unit tests for an existing project is silly. But I think there are places they can be used effectively. The first thing I'd like to do is run complexity metrics on the software. Then I'd add unit test cases for high complexity modules and for modules that are getting a lot of maintenance. Those are usually the same modules. What we want to do is invest our limited resources where they are most likely to do good. I haven't tried this method yet, but I've got a gut feeling that it will work.

Another advantage of getting programmers to write unit tests for modules that have high complexity, is that they may decide, instead, to refactor the module, reducing its complexity and improving the robustness of the code base.

To tell the truth, what I've had the best success with is software inspections. A software inspection is a bit more rigorous than a code review. Since it requires at least three people, it works best in corporate environments. I'm not sure how you can get the same effect in an open source project unless you have a couple hundred developers, like the Linux Kernel has. Still, software inspection, done right, can discover 90% of the discoverable bugs. We used it on one project at GTE after a near disastrous first release. The project, on its first go round, was six months late and had over 300 bugs that took another four months to fix. We did two things different on the next release. I wrote the spec, making sure that I could think of a concrete test for each requirement, and the development team did software inspections on each bit of code checked in. In the end, we delivered 3 weeks early, under budget, and had 4 bugs that took 3 days to fix. The new release was only about a third of the size of the original, but the numbers are still pretty good.

I'd like to find a way to get the same kind of quality in small open source projects that you see in the larger projects that have lots more developers. If I can, it would be great material for a book.

Speaking of books. I have to write today, and for the next couple of days, so won't be doing as much testing until closer to the weekend. Otherwise this novel will never be finished.

Ray

Dan Polansky wrote:
Hi Ray,

my software experience in a commercial setting tells a different story. Unit tests took a lot of effort write and maintain, and discovered few bugs. That said, judging from the experience you have shared, I would admit that the reality is probably a mixed case.

Dan
------------------------------------------------------------------------

-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >>  http://get.splunk.com/
------------------------------------------------------------------------

_______________________________________________
Freemind-developer mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/freemind-developer

-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >>  http://get.splunk.com/
_______________________________________________
Freemind-developer mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/freemind-developer

Reply via email to