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

Re: XML and unit testing

  • From: Eric van der Vlist <vdv@d...>
  • To: "Simon St.Laurent" <simonstl@s...>
  • Date: Fri, 06 Jul 2001 09:08:55 +0200

unit testing with xml
"Simon St.Laurent" wrote:
> 
> 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.

Unit testing appears to be very dependent on the way you are working as
shown by the variety of answers you've got up to now.

When it comes to testing SAX producers|filters|consumers, what I would
dream to have is a set of JUnit classes to send, receive, store and
compare suites of SAX events.

A way of describing these events could be to serialize them as XML
(JXUnit?).

That would require defining a XML syntax to express SAX events (using
the XML implied by the SAX events themselves wouldn't do the trick since
I guess I would want to test "non well formed" SAX events suites, such
as the effect of a startElement alone).

Another way to generate such tests could be to use a preprocessor (maybe
a XSLT transformation) that would generate the Java code calling the
methods of your SAX handler for a given XML document and to insert your
test points into this code.

If you are interested by something along these lines, I would be happy
to help!

Eric
> 
> 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/
> 
> ------------------------------------------------------------------
> The xml-dev list is sponsored by XML.org, an initiative of OASIS
> <http://www.oasis-open.org>
> 
> The list archives are at http://lists.xml.org/archives/xml-dev/
> 
> To unsubscribe from this elist send a message with the single word
> "unsubscribe" in the body to: xml-dev-request@l...

-- 
See you at XTech in San Diego.
             http://conferences.oreillynet.com/cs/os2001/view/e_spkr/790
------------------------------------------------------------------------
Eric van der Vlist       http://xmlfr.org            http://dyomedea.com
http://xsltunit.org      http://4xt.org           http://examplotron.org
------------------------------------------------------------------------

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.