File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Ant, Maven and Other Build Tools and the fly likes Testing  using ANT 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 » Ant, Maven and Other Build Tools
Bookmark "Testing  using ANT" Watch "Testing  using ANT" New topic

Testing using ANT

Sunder Ganapathy
Ranch Hand

Joined: Apr 01, 2003
Posts: 120
The build.file I use for the example application is as follows. The compilation goes thru, but not the testing.

Could you please help? The message is just Build successful.

Tim Holloway
Saloon Keeper

Joined: Jun 25, 2001
Posts: 15960

The problem most people have is that they have to tell Ant where the JUnit jar is, since it doesn't come in automatically. But I think that's supposed to give an exception.

Try ant with the "-v" option: "ant -v test" and see if it tells you anything more.

Customer surveys are for companies who didn't pay proper attention to begin with.
Sunder Ganapathy
Ranch Hand

Joined: Apr 01, 2003
Posts: 120
Thanks Tim. After using -v option I get the following message.

C:\tomcat\apache-tomcat-6.0.14\webapps\newselen>ant -v test

Apache Ant version 1.7.0 compiled on December 13 2006 Buildfile: build.xml
Detected Java version: 1.6 in: C:\Program Files\Java\jdk1.6.0\jre
Detected OS: Windows XP
parsing buildfile C:\tomcat\apache-tomcat-6.0.14\webapps\newselen\build.xml with
URI = file:/C:/tomcat/apache-tomcat-6.0.14/webapps/newselen/build.xml

Project base dir set to: C:\tomcat\apache-tomcat-6.0.14\webapps\newselen

[antlib] Could not load definitions from resource org/apache/tools/ant/antlib.xml. It could not be found.

[property] Loading C:\tomcat\apache-tomcat-6.0.14\webapps\newselen\
Build sequence for target(s) `test' is [test]
Complete build sequence is [test, report, compile, ]


Total time: 1 second
[ April 10, 2008: Message edited by: Sunder Ganapathy ]
I agree. Here's the link:
subject: Testing using ANT
Similar Threads
java.lang.classnotfoundexception in junit report
can't generate JUnit report
ant junitreport - producing html file with no test results
Not able run junit test cases from ANT
ANT issues - Unable to create JUnit Reports- Please help