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 31885] New: - Log JUnit TestListener events and unit test count
Date Mon, 25 Oct 2004 19:40:37 GMT
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=31885>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=31885

Log JUnit TestListener events and unit test count

           Summary: Log JUnit TestListener events and unit test count
           Product: Ant
           Version: 1.7Alpha (nightly)
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: Enhancement
          Priority: Other
         Component: Optional Tasks
        AssignedTo: dev@ant.apache.org
        ReportedBy: tom.ball@sun.com


The NetBeans IDE now uses Ant as its build engine and JUnit for unit testing,
and we want to provide a progress bar UI when running unit tests like JUnit's
Swing TestRunner.  To support this with the JUnitTask and JUnitTestRunner
classes in the optional JUnit task, we need for it to log the number of tests
which will be run, as well as each test completion.  Unlike the normal test
output, these "events" should be logged as they occur, rather than batched. 
With this support, we can attach a BuildListener and retrieve these log messages
without the project's Ant files having to be modified.

I'm attaching a patch that implements this change.  Since JUnitTestRunner needs
to be able to be run either within Ant's process, a separate process or
standalone, the patch outputs the necessary events to System.out.  The stream
forwarders in JUnitTestRunner and JUnitTask then filter out these messages and
log them in verbose mode.  This prevents the event text from changing any
formatter or logged output text (except when run in verbose mode).

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


Mime
View raw message