normal use

Change your ant build file to use junitour: add

<formatter usefile="true" classname="junitour.UnitourResultFormatter" extension=".xml"/>
<formatter usefile="false" classname="junitour.UnitourSummaryResultFormatter" />
to build.xml, an example from the junitour sources:

use with ant

To make use of the junitour lib in your own application, do the following:

  1. drop the junitour.jar file in your ant lib $ANT_HOME/lib/ directory
  2. make sure that following library is in your ANT's classpath: again: $ANT_HOME/lib/ directory
    • junitour.jar (3.8.1)
    This is normally already done, when you already work on junittests in your project ;-)
  3. example ant build file:
    <target name="internal-test" depends="compile-tests">
      <mkdir dir="${testreportdir}">
      <junit dir="./" failureproperty="test.failure" fork="true" haltonerror="false">
        <sysproperty key="basedir" value=".">
        <formatter usefile="true" classname="junitour.UnitourResultFormatter" extension=".xml">
        <formatter usefile="false" classname="junitour.UnitourSummaryResultFormatter"></formatter>
        <!--      <formatter usefile="false" type="plain"> </formatter>-->
          <fileset dir="${libdir}">
            <include name="*.jar">
          <pathelement path="${testclassesdir}">
          <pathelement path="${classesdir}">
        <batchtest todir="${testreportdir}">
          <fileset dir="${basedir}\src\java\test">
            <include name="**/*">
  4. copy the new junit_noframes.xsl into the /conf/ directory
  5. use the extended styles for junit-report-generation:
    <junitreport todir="${testreportdir}" >
      <fileset dir="${testreportdir}" >
          <include name="TEST-*.xml"/>
      <report format="noframes" styledir="${basedir}/conf" todir="${docdir}" />
For more help with using ant in general, please see: