[XML-DEV Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

XML and unit testing

  • From: "Simon St.Laurent" <simonstl@s...>
  • To: xml-dev@l...
  • Date: Wed, 04 Jul 2001 14:30:23 -0400

unit test xml
I've been considering a unit testing approach for my Regular
Fragmentations processor [1], trying to figure out what kinds of unit
testing make sense for a SAX filter [2].  I've looked at things like
JUnit [3], JXUnit [4], XSLTUnit[5], and XMLUnit[6], 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.

Simon St.Laurent
Associate Editor
O'Reilly & Associates
http://simonstl.com

[1] http://simonstl.com/projects/fragment/docs/
[2] http://www.megginson.com/SAX/Java/filters.html
[3] http://junit.org
[4] http://quickutil.sourceforge.net/view/Main/JXUnit
[5] http://xsltunit.org
[6] http://sourceforge.net/projects/xmlunit/



PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
 

Stylus Studio has published XML-DEV in RSS and ATOM formats, enabling users to easily subcribe to the list from their preferred news reader application.


Stylus Studio Sponsored Links are added links designed to provide related and additional information to the visitors of this website. they were not included by the author in the initial post. To view the content without the Sponsor Links please click here.

Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.