File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Testing and the fly likes Junit testing with using Ant build.xml getting failed everything? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Engineering » Testing
Bookmark "Junit testing with using Ant build.xml getting failed everything?" Watch "Junit testing with using Ant build.xml getting failed everything?" New topic
Author

Junit testing with using Ant build.xml getting failed everything?

Prabhat Ranjan
Ranch Hand

Joined: Oct 04, 2006
Posts: 391
Hi All,

I am using junit test cases and building the project using ant build but i tried a lot its getting failed. don't know why ?

I have reset the classpth and junit lib as well but its again not working anyways.

Build.xml file is below:


Below is the error i am getting in build console":



I have already put the junit-3.8.2.jar file in java/lib dir.


I have used very simple jubit code top test uisng Ant build. As below .and if i remove the junit file or junit code from ant build my build.xml file runs successfully without any issue.



Still its not picking and some other issue i don't know. Tried to look in google but not found the proper root cause and how to fix this issue.

Please suggest some one your thought.
Prabhat Ranjan
Ranch Hand

Joined: Oct 04, 2006
Posts: 391
Issus is resolved now..
I have tried to serach form internet and the actual probelm was classpath junit.jar file name was missing in javac/compile target.

I got the solution.

Below code is working fine now and perfect.



Also you can take help from this link.

http://www.vogella.com/articles/ApacheAnt/article.html
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Junit testing with using Ant build.xml getting failed everything?
 
Similar Threads
Question on Ant script error in my build.xml file in the Eclipse IDE
including a file in a build
Running unit test cases automatically with Ant
urgent help please (creating jar file using ant)
Ant+JUnit