Hi,

I've been looking at the W3C schema test bucket which is downloaded by
the XmlSchema project tests - ie the xsts-2002-01-16.tar.gz file. This
has three sets of tests in it - those contributed by NIST, Sun and
Microsoft. The NISTSchemaTest class in XmlSchema has a single test
method: testReadWrite() which runs through all the NIST test schemas
creating an XmlSchema object, serializing it out then using XmlUnit to
check the output is equivalent to the input. There are 1177 of these
files in the NIST set - each of them is a valid schema file and the
NISTSchemaTest passes for all of them.

I have some code which I'd like to check in which does the equivalent
for the Sun and Microsoft schemas. In fact I've rewritten the
NISTSchemaTest class so that:

* the .testSet metadata files from the xsts-2002-01-16.tar.gz are used
to determine the list of test schema files and whether each of the
schemas is valid schema or not (the Sun and Microsoft sets include
tests which are purposfully invalid, but the NIST ones are all valid).

* each of the schema files listed in the .testSet files is run as a
single JUnit so if one test fails the suite continues to run

The classes are:

tests.w3c.SchemaTest - a bean representing a description of a single
schema file described in a .testSet file
tests.w3c.TestRoundTripXSD - an instance of this uses XmlUnit to check
a single schema file is valid (or not)
tests.w3c.TestW3CSchemaTestSet - reads in a .testSet file and tests
each of the schemas described (using multiple instances of
TestRoundTripXSD)
tests.w3c.TestW3CSchemaBucket - runs a TestW3CSchemaTestSet for each
of the 3 sets.

As expected XmlSchema passes the NIST set of schemas. But it doesn't
pass the Microsoft or Sun sets. Microsoft set produces 897 errors 2148
failures from 3248 tests and the Sun set produces 1 error 17 failures
from 22 tests. This is just for the set of schemas the .testSet files
describe as being valid. The bugs could be in XmlSchema or potentially
in XmlUnit - either way I'm hoping this number of failures represents
just a small set of bugs.

Unless there are objections I'll check this test code in.

Any feedback welcome of course.

Cheers,
Jeremy

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to