I am trying to find a way to characterize an XML schema to potentially automatically generate test cases to apply to the java API generated from that schema.
Some examples: A type has an integer field; I would test setting the value (in the XML) at Integer.MAX_VALUE and Integer.MIN_VALUE, as well as outside those bounds. A type has a string field with a max length; I would test setting a value greater than that length. A string field has a specific pattern that must be matched; I would test setting something that does not match that pattern. A field has minOccurs set > 0; I would test setting the object without that field set. Etc. The schema contains these "rules", so I'm looking for a way to navigate through a schema to identify the various "types" that are generated and collect this type of information about the types so that we can then use this information to generate a set of test cases that will not only test the "happy case(s)", but also throw some curve balls at it to see how it is handled. Is there a tool in XMLBeans that might be used to accomplish this? In the absence of a tool, has anyone use the XMLBeans API to do anything like this? I've done some initial experimenting and seems like the information might be in there somewhere, but I don't know enough about XML schema or the XMLBeans API to know what to use or the best way to go about it. If anyone has ideas, suggestions, or sources to point me toward, that would be greatly appreciated.
Description: S/MIME cryptographic signature