[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
XML and unit testing
- From: "Simon St.Laurent" <firstname.lastname@example.org>
- To: email@example.com
- Date: Wed, 04 Jul 2001 14:30:23 -0400
I've been considering a unit testing approach for my Regular
Fragmentations processor , trying to figure out what kinds of unit
testing make sense for a SAX filter . I've looked at things like
JUnit , JXUnit , XSLTUnit, and XMLUnit, and I think I'm now
more confused than when I started.
In testing a filter, I need to be able to test component pieces, some of
which are plain old objects and some of which are representations of
those objects as SAX events and/or XML. I've had a number of cases
involving shallow copying (finally fixed) where the objects looked great
at the time of their creation but morphed by the time they reached the
XML output, so I really need to be able to test these things in a
variety of situations.
So far, I've been using a set of test cases and my own eyeballs. It's
worked pretty well as far as figuring out high-level pass/fail, but does
very little to help me track down where the pass/fail came from.
I doubt I'm the only person dealing with these kinds of issues on
xml-dev, but I still wonder if anyone's really explored how unit testing
and XML fit together. Validation is something that comes naturally to
XML, but it's a different kind of testing than the finer-grained object
unit testing approach I'm looking for.
O'Reilly & Associates