What about using http://xmlunit.sourceforge.net/, i think some of the other Apache WS projects use that.
...ant On 6/22/06, Simon Laws <[EMAIL PROTECTED]> wrote:
I want to add a little automated testing to the interop suite to compare input XML files with output XML files. I note that there is XML comparison function in org.apache.tuscany.sdo.test.TestUtil However this test compares everything and I am hitting the problem which is touched on in http://issues.apache.org/jira/browse/TUSCANY-427, i.e. my input xml files have comments and my output XML files don't so the current equalXML... function always returns false. For my local testing what I have done is edited the class to: 1/ Change all the static operations to non static operations 2/ Add a member variable to describe what should be ignored when testing for equality 3/ Add outputs in each failure case to record what causes XML files to be marked as not equal 4/ Added a string output stream member variable to capture all of this output 5/ Added a getReport method to return the contents of this output stream if you are interested in why the XMLs differ Now this is all very well and good but of course this breaks anything that relies on this class having static methods (it's used in about 50 places). So I can make a slight change to maintain the static interface. The question is would you rather I: A/ Make a special version for me and not patch the original (not ideal) B/ Create a patch for the original As an aside there already seems to be two copies of this file, in: tuscany\java\sdo\impl\src\test\java\org\apache\tuscany\sdo\test tuscany\java\sdo\tools\src\test\java\org\apache\tuscany\sdo\test Is there a good reason for this? If not, which one stays? Simon