• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

JUnit HTML report using Ant

 
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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>
 
Author
Posts: 12617
IntelliJ IDE Ruby
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
Posts: 12617
IntelliJ IDE Ruby
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic