[Date Prev]
| [Thread Prev]
| [Thread Next]
| [Date Next]
--
[Date Index]
| [Thread Index]
Re: [xml-dev] How many unit tests should I create for my XML application?
- From: Timothy Cook <timothywayne.cook@gmail.com>
- To: "Costello, Roger L." <costello@mitre.org>
- Date: Sat, 24 Nov 2012 16:50:16 -0200
Hi Roger,
First, I don't think so.
It kind of depends on what you app does. However, if it consumes XML documents and then produces XML documents. Assuming the input documents are validated against a schema that has been validated and the output documents are validated against schemas that have been validated. It doesn't do anything in the middle that can cause irregular output, e.g. it does processing and then gives user feedback directly. Then your unit test count is zero. You have a validation chain already built based on those 14,285 unit tests. IMHO, of course.
--Tim
On Sat, Nov 24, 2012 at 4:29 PM, Costello, Roger L.
<costello@mitre.org> 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?
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
_______________________________________________________________________
XML-DEV is a publicly archived, unmoderated list hosted by OASIS
to support XML implementation and development. To minimize
spam in the archives, you must subscribe before posting.
[Un]Subscribe/change address: http://www.oasis-open.org/mlmanage/
Or unsubscribe: xml-dev-unsubscribe@lists.xml.org
subscribe: xml-dev-subscribe@lists.xml.org
List archive: http://lists.xml.org/archives/xml-dev/
List Guidelines: http://www.oasis-open.org/maillists/guidelines.php
--
============================================
Timothy Cook, MSc +55 21 94711995
MLHIM
http://www.mlhim.org
LinkedIn Profile:
http://www.linkedin.com/in/timothywaynecookAcademic.Edu Profile:
http://uff.academia.edu/TimothyCook
Google Scholar:
http://goo.gl/MMZ1o
[Date Prev]
| [Thread Prev]
| [Thread Next]
| [Date Next]
--
[Date Index]
| [Thread Index]