Skip to Content.
Sympa Menu

xom-interest - Re: [XOM-interest] Serializer performance patches

xom-interest AT lists.ibiblio.org

Subject: XOM API for Processing XML with Java

List archive

Chronological Thread  
  • From: Elliotte Harold <elharo AT metalab.unc.edu>
  • To: Wolfgang Hoschek <whoschek AT lbl.gov>
  • Cc: xom-interest AT lists.ibiblio.org
  • Subject: Re: [XOM-interest] Serializer performance patches
  • Date: Thu, 30 Jun 2005 07:59:22 -0400

Wolfgang Hoschek wrote:
Wrt. the ill-advised unit test craze: Writing unit tests with exhaustive coverage for every line of code may work well for small toys or projects with many committers, but would be a complete waste of time for the Saxon one man show. While early interactive experimental tests and automated integration tests (of which Saxon has a gazillion) do have a useful cost/benefit ratio, fine grained 100% unit test coverage mania is ill advised. It would take *years* to write and maintain such tests, while interesting development and evolution would almost completely stagnate. Saxon is solid and at the same time far ahead leading the pack, getting the priorities right. Just my take.

Wolfgang, have you actually tried achieving 100% unit test coverage? Most projects including XOM will never get there, but the effort produces stunning results. I've lost count of the number of bugs expanding tests has found in code that was "Too simple to break", much less in code that was relatively complex.

The effort to achieve 100% code coverage also pays off in other ways. It reveals problems with the API. It identifies dead, unreachable code that can be eliminated. Sometimes just redirecting your attention and making you look at code in a new way can pay unexpected benefits.

The problem I have with Saxon 6 is not that it isn't tested. For all I know it does come close to 100% coverage. The problem is that the test suite is not published with the source code. The code base is open but the tests are closed. This makes it extremely difficult for anyone else to pick up where Michael Kay left off. As you point out, it might take years to write and maintain such tests from scratch. Had it not been required to do this from scratch, then I might have decided it was more productive to fix the bugs in Saxon instead of fixing the bugs in Jaxen, but Jaxen had an open test suite and Saxon didn't. :-(

--
Elliotte Rusty Harold elharo AT metalab.unc.edu
XML in a Nutshell 3rd Edition Just Published!
http://www.cafeconleche.org/books/xian3/
http://www.amazon.com/exec/obidos/ISBN=0596007647/cafeaulaitA/ref=nosim




Archive powered by MHonArc 2.6.24.

Top of Page