Bug 52237

Summary: build.xml file improvement to allow not just plaintext junit logs.
Product: Tomcat 7 Reporter: mhasko
Component: PackagingAssignee: Tomcat Developers Mailing List <dev>
Status: RESOLVED FIXED    
Severity: normal    
Priority: P2    
Version: trunk   
Target Milestone: ---   
Hardware: PC   
OS: Linux   
Attachments: the patch

Description mhasko 2011-11-24 11:30:21 UTC
MOTIVATION:
* be able to generate xml logs from JUnit tests (can then be transformed to html)
* reuse as much code as available

IMPLEMENTATION:
* added <property name="junit.formatter.type" value="plain"/>
* added <property name="junit.formatter.extension" value=".txt"/>
* removed the default '.txt' junit logs extension
* changed the junit <formatter> to use junit.formatter.{type|extension} properties

USAGE:
* custom build file including the original one:
<project name="importing" basedir="." default="deploy">
  <import file="build.xml"/>
  <target name="test-xml">
    <antcall target="test">
      <param name="junit.formatter.type" value="xml"/>
      <param name="junit.formatter.extension" value=".xml"/>
    </antcall>
  </target>
</project>

Patch based on 'trunk' branch revision 1205789

Please change the 'Component' field if necessary. 'Packaging' seemed to be the most appropriate for build.xml changes.
Comment 1 mhasko 2011-11-24 11:32:27 UTC
Created attachment 27979 [details]
the patch

re-attaching the patch, it failed to create at bug submission
Comment 2 Mark Thomas 2011-11-30 20:55:27 UTC
Patch applied to trunk and 7.0.x and it will be included in 7.0.24 onwards.

Many thanks for the patch.
Comment 3 Konstantin Kolinko 2012-01-09 19:25:11 UTC
With r1229314 I added one more configurable property to this:

junit.formatter.usefile

It will be in 7.0.24 as well.