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

Re: How many unit tests should I create for my XML application

  • From: Michael Sokolov <sokolov@ifactory.com>
  • To: "Costello, Roger L." <costello@mitre.org>
  • Date: Sat, 24 Nov 2012 22:12:37 -0500

Re:  How many unit tests should I create for my XML application
On 11/24/2012 1:29 PM, Costello, Roger L. wrote:
> Hi Folks,
>
> I am building an XML application. That is, my application consumes XML documents and then performs processing. The XML documents conform to an XML Schema.
>
> How many unit tests should I write for my XML application?

The usual approach to measuring test coverage is to look at what 
percentage of your source code (generally measured by lines, or 
sometimes also branches of conditionals when those don't correspond to 
lines) is exercised by the test suite.  There are a lot of tools for 
doing this w/Java and other programming languages.  We recently 
developed one for XSLT that uses Saxon's CodeInjector; I am hoping we 
will be able to release it as open source some time in the not too 
distant future. It does measure coverage by lines, and although that 
does seem a bit weird for XSLT it is a good enough approximation I think.

It sounds as if you are interested in testing your schema rather than an 
actual application as I would think of it?  I'm not sure how difficult 
it would be to create a test coverage tool for XML Schema validation, 
but it should in theory be possible to instrument the validator, and 
count the number of distinct lines exercised by your test suite, and 
even produce a report showing which ones those are, so you can continue 
to improve your coverage by focusing new tests on areas with coverage gaps.

-Mike Sokolov


[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index]


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.