cxf-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Daniel Kulp (JIRA)" <>
Subject [jira] Commented: (CXF-1000) Remove string compares of XML from unit tests
Date Fri, 21 Sep 2007 13:22:50 GMT


Daniel Kulp commented on CXF-1000:

I still don't think we should be comparing entire WSDL documents for 95% of the cases.   It's
too fragile and you end up testing things that that specific test shouldn't be.   A test that
tests if a particular method is mapped correctly should use xpaths to make sure the operation
is correctly found in the wsdl.   It should not compare the entire wsdl.   Tests that test
fault mapping should XPath to make sure the faults are there.    etc..

For example, if I change the ordering of how the wsdl generator orders the messages or operations
(the order right now seems awkward), tests like the the above should NOT fail.   The mapping
is still correct.   It's just in a different place in the wsdl.    

Likewise, we don't have control over the internals of JAXB and XMLBeans and JIBX and such.
  If they use HashMaps internally to hold data, when they write out schemas, it could completely
depend on what order the JVM puts them in the HashMaps.   That's not good.

> Remove string compares of XML from unit tests
> ---------------------------------------------
>                 Key: CXF-1000
>                 URL:
>             Project: CXF
>          Issue Type: Task
>    Affects Versions: 2.0.1
>            Reporter: Daniel Kulp
> There are a lot of tests that are doing striaght string compares of XML results with
files on the disk.   This makes it harder than necessary to update things when behavior changes.
 (like different XML serialization routine used).
> The tests should either normalize the XML and use a normalization compare routine, or
preferably, use XPATHS to test specifically if the interested nodes and information that the
test is actually testing is in the XML so the format of the XML is irrelevant.

This message is automatically generated by JIRA.
You can reply to this email to add a comment to the issue online.

View raw message