wood burning stoves 2.0*
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
Author

java.lang.classnotfoundexception in junit report

srinivas Doni
Greenhorn

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,
srini
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 | nsahni@infocepts.com | www.infocepts.com
srinivas Doni
Greenhorn

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


Thanks for helping me to fix this error.







Thanks & Regards,
srini
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: java.lang.classnotfoundexception in junit report
 
Similar Threads
Empty Junit reports from ant
Not able run junit test cases from ANT
Junit-Ant Building
Ant+JUnit
can't generate JUnit report