Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

JUnit HTML report using Ant

 
mathyas ma
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi all

I am using Ant to build my JUnit through eclipse but I am having some issues to produce HTML Report. If you have some idea please give me some example. Below is the script I have used to produce report but it can't crate report directory. I have the class name "MyTest"
Thank you

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

<project name="MyTest" default="MyTest">

<property name="MyTest sample" value="Hello"/>

<target name="MyTest">
</target>

<fileset dir="./reports">

<include name="TEST-*.xml"/>
</fileset>
<report format="frames" todir="./report/html"/>

</project>
 
David Newton
Author
Rancher
Posts: 12617
IntelliJ IDE Ruby
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Try using <mkdir> to actually make the directory first.
 
mathyas ma
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thank you David for replaying my post. After adding mkdir the report folder crated in the directory but after running the project my HTML report still empty, any idea how to post the report in the decretory?
 
David Newton
Author
Rancher
Posts: 12617
IntelliJ IDE Ruby
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I don't see anything there that creates JUnit reports.

http://ant.apache.org/manual/OptionalTasks/junit.html
http://ant.apache.org/manual/OptionalTasks/junitreport.html

If you post more XML make sure you UseCodeTags.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic