ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject DO NOT REPLY [Bug 9074] New: - XMLJUnitResultFormatter.java assumes Test is TestCase
Date Tue, 14 May 2002 15:41:34 GMT
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=9074>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=9074

XMLJUnitResultFormatter.java assumes Test is TestCase

           Summary: XMLJUnitResultFormatter.java assumes Test is TestCase
           Product: Ant
           Version: 1.5Beta1
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: Major
          Priority: Other
         Component: Optional Tasks
        AssignedTo: ant-dev@jakarta.apache.org
        ReportedBy: isberg@parc.com


XMLJUnitResultFormatter only gets names of TestCase, which make reporting fail 
for other Test implementations, including TestSuite.  True in Ant 1.4.1 
(ClassCastException) and 1.5Beta1 (hides with "unknown" result).

--- XMLJUnitResultFormatter.java:

public void startTest(Test t) {
...
   currentTest.setAttribute(ATTR_NAME, 
       JUnitVersionHelper.getTestCaseName(t));

--- JUnitVersionHelper.java:
    public static String getTestCaseName(Test t) {
        if (t instanceof TestCase && testCaseName != null) {
        ...

Recommend instanceof TestCase, TestSuite, (and TestDecorator?) and as a last 
resort use toString() for implementors of Test interface.

--
To unsubscribe, e-mail:   <mailto:ant-dev-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:ant-dev-help@jakarta.apache.org>


Mime
View raw message