harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "George Harley (JIRA)" <j...@apache.org>
Subject [jira] Updated: (HARMONY-268) Custom JUnit results formatters to provide console progress messages
Date Wed, 29 Mar 2006 09:29:54 GMT
     [ http://issues.apache.org/jira/browse/HARMONY-268?page=all ]

George Harley updated HARMONY-268:
----------------------------------

    Attachment: Harmony-268-part1.txt

Two very simple custom JUnit result formatters that I propose we drop straight into folder
support/src/tests/java/tests/util/junit. 

* tests.util.junit.HarmonyXMLJUnitResultsFormatter - simply extends org.apache.tools.ant.taskdefs.optional.junit.XMLJUnitResultFormatter
and sends status messages to stdout when test events are received after delegating to the
parent to do the report-building work.

* tests.util.junit.HarmonyPlainJUnitResultsFormatter - simply extends org.apache.tools.ant.taskdefs.optional.junit.PlainJUnitResultFormatter
and sends status messages to stdout when test events are received after delegating to the
parent to do the report-building work.

An example of using these in an Ant script would be as follows (keeping my fingers crossed
that this renders alright) ...

<test name="tests.luni.AllTestsWithExclusions"
    todir="${hy.tests.reports}"
    haltonfailure="no" >

    <formatter 
        classname="tests.util.junit.HarmonyPlainJUnitResultsFormatter"
        extension=".txt"/>
      	
</test>	

If using the tests.util.junit.HarmonyXMLJUnitResultsFormatter class then the "extension" attribute
value would be changed to ".xml" .


Hope this helps, 
George

> Custom JUnit results formatters to provide console progress messages
> --------------------------------------------------------------------
>
>          Key: HARMONY-268
>          URL: http://issues.apache.org/jira/browse/HARMONY-268
>      Project: Harmony
>         Type: Improvement
>   Components: Misc
>  Environment: All
>     Reporter: George Harley
>  Attachments: Harmony-268-part1.txt
>
> This is related to HARMONY-263. If the "junit" task is used with a "test" child element
rather than a "batchtest" child element then there is no information written out to the console
to let the tester know how the tests are getting on - the tester just has to wait until the
run eventually terminates and the XML or plain text report gets written. This can be a bit
disconcerting if the tests run for several minutes. 
> The suggested improvement to this is to specify a custom results formatter class in the
"formatter" element that generates the required reports but also writes passed/failed/error
messages to console as each test completes. 
> Patch to follow. 
> Best regards, 
> George

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


Mime
View raw message