You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ant.apache.org by bu...@apache.org on 2002/05/14 17:41:34 UTC
DO NOT REPLY [Bug 9074] New: -
XMLJUnitResultFormatter.java assumes Test is TestCase
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: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>