diff --git a/WHATSNEW b/WHATSNEW index 9b4408d17..9c7e4fdc2 100644 --- a/WHATSNEW +++ b/WHATSNEW @@ -548,10 +548,10 @@ Other changes: 's manual page). Bugzilla Report 21877. * will now have a new attribute spawn (default false). -If set to true, the process will be spawned. Bugzilla Report 5907. + If set to true, the process will be spawned. Bugzilla Report 5907. * will now have a new attribute spawn (default false). -If set to true, the process will be spawned. Bugzilla Report 5907. + If set to true, the process will be spawned. Bugzilla Report 5907. * now supports a timeout which can be used to recover from deadlocks, etc in the parallel threads. also @@ -571,6 +571,9 @@ If set to true, the process will be spawned. Bugzilla Report 5907. used to incrementally build an archive mixing compressed and uncompressed entries. +* 's XML formatter adds a new classname attribute to the + elements. + Changes from Ant 1.5.3 to Ant 1.5.4 =================================== diff --git a/src/main/org/apache/tools/ant/taskdefs/optional/junit/XMLConstants.java b/src/main/org/apache/tools/ant/taskdefs/optional/junit/XMLConstants.java index 32775252f..473044408 100644 --- a/src/main/org/apache/tools/ant/taskdefs/optional/junit/XMLConstants.java +++ b/src/main/org/apache/tools/ant/taskdefs/optional/junit/XMLConstants.java @@ -121,4 +121,7 @@ public interface XMLConstants { /** value attribute for property elements */ String ATTR_VALUE = "value"; + /** classname attribute for testcase elements */ + String ATTR_CLASSNAME = "classname"; + } diff --git a/src/main/org/apache/tools/ant/taskdefs/optional/junit/XMLJUnitResultFormatter.java b/src/main/org/apache/tools/ant/taskdefs/optional/junit/XMLJUnitResultFormatter.java index 865f493a6..ccda8f5ec 100644 --- a/src/main/org/apache/tools/ant/taskdefs/optional/junit/XMLJUnitResultFormatter.java +++ b/src/main/org/apache/tools/ant/taskdefs/optional/junit/XMLJUnitResultFormatter.java @@ -214,6 +214,10 @@ public class XMLJUnitResultFormatter implements JUnitResultFormatter, XMLConstan currentTest = doc.createElement(TESTCASE); currentTest.setAttribute(ATTR_NAME, JUnitVersionHelper.getTestCaseName(test)); + // a TestSuite can contain Tests from multiple classes, + // even tests with the same name - disambiguate them. + currentTest.setAttribute(ATTR_CLASSNAME, + test.getClass().getName()); rootElement.appendChild(currentTest); testElements.put(test, currentTest); } else {