For some reason, My
ant task is not creating
JUNIT's HTML reports? Here are the details..
1) It creates C:\reports directory. It contains some html files including index.html. if I open this HTML file,. it shows zero tests as below. But actually it runs 2 tests successfully. Could you see any problem?
Tests Failures Errors Success rate Time
0 0 0 NaN 0.000
It also creates TESTS-TestSuites.xml. But this xml file is emty
I am using JUNIT 4.1, Ant 1.7 Beta and
Java 1.5
Here is the snippet of my ant build script. Note that on my command window, I could see that "OK (2 tests)"...but why it is not writing this to HTML report. When I open the
My Ant Task:
============
------------------------------------
<target name="report" depends="run">
<junitreport todir="./reports">
<fileset dir="reports">
<include name="TEST-*.xml"/>
</fileset>
<report format="frames" todir="./reports"/>
</junitreport>
</target>
-----------------------------------------
Command promt details:
=====================
C:\>ant -f build.xml run
Buildfile: build.xml
init:
compile:
[javac] Compiling 1 source file to C:\java\source\test\java
update:
[jar] Building jar: C:\java\java-client-driver-tests.
jar
run:
[java] JUnit version 4.1
[java] ..
[java] Time: 12.86
[java] OK (2 tests)
report:
[junitreport] Processing C:\reports\TESTS-TestSuites.xml to C:\DOCUM
E~1\micky\LOCALS~1\Temp\null82112573
[junitreport] Loading stylesheet jar:file:/C:/ant1.7.0/lib/ant-junit.jar!/org/ap
ache/tools/ant/taskdefs/optional/junit/xsl/junit-frames.xsl
[junitreport] Transform time: 1281ms
[junitreport] Deleting: C:\DOCUME~1\micky\LOCALS~1\Temp\null82112573
BUILD SUCCESSFUL
Total time: 23 seconds