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 14225] New: - JUnit task creates empty result files if test times out
Date Mon, 04 Nov 2002 14:34:48 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=14225>.
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=14225

JUnit task creates empty result files if test times out

           Summary: JUnit task creates empty result files if test times out
           Product: Ant
           Version: 1.5
          Platform: Sun
        OS/Version: FreeBSD
            Status: NEW
          Severity: Normal
          Priority: Other
         Component: Optional Tasks
        AssignedTo: ant-dev@jakarta.apache.org
        ReportedBy: christer.a.palm@foreningssparbanken.se


Hi!
When the JUnit task is used with the "timeout" attribute, and the test times 
out, it creates empty result file(s).

This causes the following "warning" in the JUnitReport task:
[junitreport] [Fatal Error] :-1:-1: Premature end of file.
[junitreport] The file foobar.xml is not a valid XML document. It is possibly 
corrupted.

The JUnitReport task still creates a report, but the report doesn't include any 
information about the failed test. This means that you may easily get fooled 
into believing that all tests went through successfully, when they in fact 
didn't.

IMO, there are basically two problems here;

 1) In the event of a timeout, the JUnit task should still create output files 
properly indicating a timeout as the reason for the failure.

 2) The JUnitReport task should provide a hint in the report that there was a 
failure when processing the input files. Alternatively, it should fail 
altogether without creating any report at all.

--
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