Help coderanch get a
new server
by contributing to the fundraiser
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Devaka Cooray
  • Liutauras Vilda
Sheriffs:
  • Jeanne Boyarsky
  • paul wheaton
  • Henry Wong
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Tim Moores
  • Carey Brown
  • Mikalai Zaikin
Bartenders:
  • Lou Hamers
  • Piet Souris
  • Frits Walraven

java.lang.classnotfoundexception in junit report

 
Greenhorn
Posts: 23
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Ranch Hand
Posts: 55
Spring Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Nilesh Sahni,


Thanks for helping me to fix this error.







Thanks & Regards,
srini
 
reply
    Bookmark Topic Watch Topic
  • New Topic