Ant.junitreport generates rest reports fine, but all with size 0KB listed unless refresh the explorer

(xiaoxi_luo) #1

I did something similar to this post ( to generate junit report. Here’s what my build.gradle looks like: repositories {

maven { url localMavenRepo } } configurations {

antClasspath } dependencies {

antClasspath ‘org.apache.ant:ant-junit:1.8.4’

} ClassLoader antClassLoader =

configurations.antClasspath.each { File f ->



task test {

//…do testing stuff


fileset(dir: “${projectDir}/testReport”){

include(name: “TEST-*.xml”)


report(format:“frames”, todir:"${projectDir}/testReport/htmlReport")

} }

When looking at the htmlReport folder, all the report files were generated but listed with file size of 0KB. Only after refreshing windows explorer, the file sizes were updated. The content of the reports were in fact generated just fine. Has anyone seen a similar issue? Or am I not using junitreport correctly.

(Luke Daley) #2

It’s likely just Windows not seeing the filesystem updates.

(xiaoxi_luo) #3

Thanks for the quick reply. I also tried to use junitreport in an ant script for same tests. Windows was able to see the filesystem updates right away. Just would like to make sure there is nothing wrong with the way I am calling junitreport in gradle, which might cause the issue…