This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes Testing and the fly likes ant junitreport - producing html file with no test results Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Engineering » Testing
Bookmark "ant junitreport - producing html file with no test results" Watch "ant junitreport - producing html file with no test results" New topic
Author

ant junitreport - producing html file with no test results

Mark Brownengland
Greenhorn

Joined: Apr 30, 2006
Posts: 26
Hi,

I have created the following ant script which runs some junit tests (harnessing selenium) to test the web UI. This all works fine and I can see the resulting TEST*.xml files. For some reason though, when junitreport has completed generating its html files and I open the index.html, the page contains no test results.

My ant script is as follows:


I have two classes in my bin directory as follows:

HelloWorldSeleniumTest.class
com/test/FirstSeleniumTest.class

This produces 2 XML files in my reports directory:

TEST-com.test.FirstSeleniumTest
TEST-HelloWorldSeleniumTest


My directory structure is as follows:

bin/ - contains the junit .class files
lib/selenium-java-client-driver-1.0.1/selenium-java-client-driver.jar
src/ - contains the junit .java files
test/results/junit/ - this contains the XML and junitreport html files


appreciate if anyone can see anything glaring as to why junitreport is not picking up on the xml files and outputting them in the resulting html files.

Thanks in advance,

Mark
David Newton
Author
Rancher

Joined: Sep 29, 2008
Posts: 12617

It's *really* confusing to have three variables pointing to the same directory and use them interchangeably even though they mean the same thing :(

Did you try running it verbose?
Mark Brownengland
Greenhorn

Joined: Apr 30, 2006
Posts: 26

Hi,

thanks for the reply. Its true I am using multiple variables which are pointing to the same directory. I don't believe however that this should be causing a problem. I will try verbose mode to see if this reveals anything.

Just to add, there are no errors when running the ant script, just the generated html that junitreport produces contains no test results i.e. does not appear to be picking up the xml files produced by junit.

Appreciate any thoughts on anything that might be wrong with the above ant script.

Thanks in advance,

Mark
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: ant junitreport - producing html file with no test results
 
Similar Threads
Empty Junit reports from ant
WSAD 5/Ant/JUNIT problem
WSAD5 Ant/JUNIT problem
conditional build failure in Ant
Testing using ANT