XML.orgXML.org
FOCUS AREAS |XML-DEV |XML.org DAILY NEWSLINK |REGISTRY |RESOURCES |ABOUT
OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

 


Help: OASIS Mailing Lists Help | MarkMail Help

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index]
How many unit tests should I create for my XML application?

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?

To answer this question I looked at one other XML application. Specifically I looked at XML Schema validators.

An XML Schema validator is an XML application -- an XML Schema validator consumes XML Schema documents (and XML instance documents) and then performs processing. The XML Schemas must conform to a schema-for-schemas.

I downloaded the XML Schema Test Suite to see how many tests it contains and I discovered that it contains 14,285 unit tests.

The schema-for-schemas is 2,374 lines. So there are 6 unit tests for each line of schema code. Is that a reasonable benchmark -- 6 units tests for each line of XML Schema? 

Thus, if my XML application consumes XML documents which conform to an XML Schema that is 100 lines long, then I should create 600 unit tests. Does that sound about right?

/Roger


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


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

Copyright 1993-2007 XML.org. This site is hosted by OASIS