There are some issues with the Java unit testing framework of XML Security, namely: - Most of the org.apache.* unit tests can be run via the "AllTests" class, but some are omitted. - The test configuration in build.xml runs AllTests, but also runs *Test*.java, so most of the org.apache.* unit tests are run twice. - Some of the tests write to System.out - One of the tests, IaikCoreFeaturesTest, is failing. I'll submit a patch for these issues later this week hopefully.
Created attachment 23714 [details] A patch for this issue Attached is a patch for these issues. Namely, "ant test" only runs the src_unitTests\org\apache\xml\security\test\AllTests.java test suite, which in turn runs all of the org.apache test suites, whereas before most of these tests were run twice. I also removed a lot of the test output to System.out. I couldn't find out why one of the javax unit tests, IaikCoreFeaturesTest, was failing. I checked the 1.4.2 and 1.4.1 release tags, and the test was failing in both of these tags.
Created attachment 23888 [details] A second patch for this issue This is part two of a patch for improving the unit tests. This patch fixes the failing IaikCoreFeaturesTest. The test verifies an iaik test signature which contains a number of different references. One of the references is to the document found here: http://www.w3.org/TR/2000/REC-xml-20001006 The reason signature verification was failing is that this document seems to have been modified since the signature was created....specifically, it used to be: <html lang="EN"> but now it has: <html xmlns="http://www.w3.org/1999/xhtml" lang="EN"> and so the digest comparison fails. I changed the test by adding a URIDerefencer which points to a local copy of the document in "data" which was there previously and doesn't have the additional default namespace. Colm.
Created attachment 23898 [details] Patch no. 3 Patch no. 3 for cleaning up the tests. This patch stops the Baltimore interop test writing out bad signatures to the "data" directory...these particular tests are expected to fail, and we shouldn't be writing anything to a directory that isn't cleaned with ant/mvn clean.
Patches applied. Colm.