OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.


Help: OASIS Mailing Lists Help | MarkMail Help



   Re: RE: [xml-dev] Testing

[ Lists Home | Date Index | Thread Index ]

Thanks Michael,

From what you have said, I see the need for at least three levels of testing when it comes to XML. I need to check that the document is valid in the XML sense (ie conforms to the DTD). I then need to check the data contained within any reply to my XML request is as expected. Finally I need to check that the application has done what it was supposed to do when the request arrived. 

With this in mind I need to run a series of positive and negative test cases using combinations of well formed documents, malformed documents, good data and bad data. With each request I need to perform the various checks that apply to that case (ie - does the document conform, if it does is the data OK and has the application done what it was supposed to do?).

I'm now starting to get a picture of what I need to do (as above). Is this the kind of testing that other people do or is it unique to my case?


Paul Tucker
Merit AT Ltd
Professional Test Automation
Tel: 01506 41 43 49
Mob: 0771 511 0244
----- Original Message -----
From: Michael Kay
Sent: 3/6/2002 11:32:10 AM
To: ptucker@merit-at.com;xml-dev@lists.xml.org
Subject: RE: [xml-dev] Testing

The first advice I give on this is: when you say that as the document
recipient, you want to ensure that the incoming documents are "valid", you
aren't using the word "valid" in the XML sense. An XML document is valid if
it conforms to the DTD that the originator says it conforms to. That's not
what you're interested in, you're interested in whether it meets the
constraints imposed by your application. Your first challenge is to define
exactly what you want "valid" to mean in your context. You can then set
about deciding how to test for that validity: some combination of validation
against a DTD, a Schema, or a custom application. It depends how complex the
rules are, and whether validation is self-contained or contextual ("the
document must identify an employee whose personnel number is already in the
database"). I've seen some people use XSLT stylesheets for validation, and
the Schematron engine gives you a good way of doing this.

I think it's also a good idea to build in a concept of trust. You don't need
to validate documents from originators whom you can trust to get it right.

Michael Kay
Software AG
home: Michael.H.Kay@ntlworld.com
work: Michael.Kay@softwareag.com

> -----Original Message-----
> From: Paul Tucker [mailto:ptucker@merit-at.com]
> Sent: 06 March 2002 16:40
> To: xml-dev@lists.xml.org
> Subject: [xml-dev] Testing
> This is my first venture into the XML world so please excuse
> my ignorance. I am testing an application that has an XML
> interface to allow B2B messaging. At the moment this is very
> much a learning phase for me (in at the deep end as usual!)
> and I am trying to gather as much info as possible.
> When it comes to testing for XML the main focus seems to be
> on testing that documents are valid. From my perspective I am
> interested in this but also how my application is going to
> deal with the XML it receives (whether it be valid or
> invalid). This means that I am going to have to send
> different documents (both invalid and valid) with different
> sets of data and check the response document and data is OK
> and that what I expect to happen in the application itself
> actually happens.
> We have started prototyping an application that will allow us
> to do this type of testing but I wanted to find out what
> other people do for this - I guess system -  testing and if
> there are already any tools that I've missed!
> Thanks,
> Paul
> Paul Tucker
> Merit AT Ltd
> Professional Test Automation
> Tel: 01506 41 43 49
> Mob: 0771 511 0244
> www.merit-at.com
> -----------------------------------------------------------------
> The xml-dev list is sponsored by XML.org <http://www.xml.org>, an
> initiative of OASIS <http://www.oasis-open.org>
> The list archives are at http://lists.xml.org/archives/xml-dev/
> To subscribe or unsubscribe from this list use the subscription
> manager: <http://lists.xml.org/ob/adm.pl>


News | XML in Industry | Calendar | XML Registry
Marketplace | Resources | MyXML.org | Sponsors | Privacy Statement

Copyright 2001 XML.org. This site is hosted by OASIS