ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Dominique Devienne <>
Subject <junitreport> slowed down by <properties>
Date Tue, 23 Mar 2004 16:31:53 GMT
Others have reported this, but the fact that the XML logger
for <junit> records the Java System properties used by that
one test case considerably slows down the transform, and also
takes lots of space.

One of my projects forks 309 testcases. With <properties>, it
adds up to 6.5 MB aggregated file. Without, it's 600 KB!!!
Seems to me the properties are always the same for all tests,
at least they should be before the test runs.

But the kicker is about the transform speed! By pre-processing
the XML files to remove the <properties> element before the
aggregation, it transforms in 61 seconds instead of 217 sec!

BTW, I was pre-processing into .xmls files, and using the
appropriate <fileset> in <junitreport>, but that task further
restricts the fileset to only files ending with .xml, so it
took me a while to figure out why my .xmls files were not used.

ALSO, <style> is *very* verbose, putting out a message for every
single file it transforms, instead of something of the like of
<javac> or <copy> that just say how many files they'll process.

To preprocess the file:

    <mkdir dir="build/logs/tests-no-properties" />
    <style basedir="build/logs/tests"
           style="config/strip-test-properties.xsl" extension=".xml">
      <include name="TEST-*.xml" />

The strip-test-properties.xsl stylesheet:

<?xml version="1.0" encoding="UTF-8"?>

<xsl:stylesheet version="1.0"

  <xsl:output method="xml" />

  <xsl:template match="/ | node() | @* | comment() |
      <xsl:apply-templates select="@* | node()" />

  <!-- do not output the <properties> element! -->
  <xsl:template match="properties">


To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message