Ant target generate empty suite xml file

Posted by user200317 on Stack Overflow See other posts from Stack Overflow or by user200317
Published on 2010-01-13T22:57:55Z Indexed on 2010/04/03 17:33 UTC
Read the original article Hit count: 553

Filed under:
|

I am using ant for my project and I have been trying to generate JUnit report using ant target. The problem I run in to is that at the end of the execution my TESTS-TestSuites.xml is empty. But all the other individual test xml files have data. And due to this my html reports are empty, in the sense results shows "0".

Here is my ant target

    <!-- JUnit Reporting -->
<target name="test-report" depends="build-all" description="Generate Test Results as HTML">

    <taskdef name="junitreport" classname="org.apache.tools.ant.taskdefs.optional.junit.XMLResultAggregator"/>
    <junit printsummary="on" haltonfailure="off" haltonerror="off" fork="yes">
        <batchtest fork="yes" todir="${test.reports}" filtertrace="on">
            <fileset dir="${build.classes}" includes="**/Test*Selenium.class"/>
        </batchtest>
        <formatter type="plain" usefile="false"/>
        <formatter type="xml" usefile="true"/>
        <classpath>
            <path refid="classpath"/>
            <path refid="application"/>
        </classpath>
    </junit>
    <echo message="running JUnit Report" />
    <junitreport todir="${test.reports}">
        <fileset dir="${test.reports}">
            <include name="Test-*.xml" />
        </fileset>
        <report format="frames" todir="${test.reports.html}" />
    </junitreport>
</target>

This is what I get as ant print summary,

[junitreport] Processing C:\YukonSelenium\reports\TESTS-TestSuites.xml to   C:\DOCUME~1\user\LOCALS~1\Temp\null1848051184

[junitreport] Loading stylesheet jar:file:/C:/DevApps/apache-ant-1.7.1/lib/ant
junit.jar!/org/apache/tools/ant/taskdefs/optional/junit/xsl/junit-frames.xsl
[junitreport] Transform time: 859ms
[junitreport] Deleting: C:\DOCUME~1\user\LOCALS~1\Temp\null1848051184

Here's how junit report looks like http://www.freeimagehosting.net/image.php?43dd69d3b8.jpg

Thanks in advance,

© Stack Overflow or respective owner

Related posts about ant

Related posts about junit