This week's book giveaway is in the OO, Patterns, UML and Refactoring forum.
We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma on-line!
See this thread for details.
The moose likes Java in General and the fly likes java.lang.classnotfoundexception in junit report Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

JavaRanch » Java Forums » Java » Java in General
Bookmark "java.lang.classnotfoundexception in junit report" Watch "java.lang.classnotfoundexception in junit report" New topic

java.lang.classnotfoundexception in junit report

srinivas Doni

Joined: Jun 02, 2011
Posts: 23
Hi to all,

I am getting error
java.lang.ClassNotFoundException: org.test.HelloWorldTest
while i am
generating a junit report with ant script. but, junit test cases are being executed successfully when i run independently(not with ant script).

I have written ant script like this,

if any one is familiar about junit report with ant, can help to solve this problem

With Regards,
N Sahni
Ranch Hand

Joined: Jul 07, 2011
Posts: 55

You need to provide compiled junit class files to <junit> task.
Try modifying line no: 42 with below code sample:

Inclusion of classes.dir is important, as this is the location where compiled junit class files are going.

Thanks and Regards,
Nilesh Sahni | |
srinivas Doni

Joined: Jun 02, 2011
Posts: 23
Hi Nilesh Sahni,

Thanks for helping me to fix this error.

Thanks & Regards,
Have you checked out Aspose?
subject: java.lang.classnotfoundexception in junit report
It's not a secret anymore!