Win a copy of Mesos in Action this week in the Cloud/Virtualizaton forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

java.lang.classnotfoundexception in junit report

 
srinivas Doni
Greenhorn
Posts: 23
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 55
Java Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
srinivas Doni
Greenhorn
Posts: 23
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Nilesh Sahni,


Thanks for helping me to fix this error.







Thanks & Regards,
srini
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic