• 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
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

taskdef class org.testng.TestNGAntTask can't be found

 
Ranch Hand
Posts: 33
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
HI
I am trying to run an automation suite integrating selenium web driver with testng, but when i try writing an ant script i keep getting this error, which basically has to do with the classpath, and i am sure i have the specified class in testng-6.8.jar which was included in my classpath

taskdef class org.testng.TESTNGAntTask cannot be found using the classloader AntClassLoader[C:\XXXXXX\lib\testng-6.8.jar]

and here is the snippet of this in my build.xml file
i tried various ways , but unfortunately none worked.

1)





2)





Any pointers on this is truly appreciated.

Thanks & Regards,
Shashank
 
author
Posts: 5856
7
Android Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Have you tried running ant with the -v or -d options, that should give you some extra output which might help you solve this.
 
Shashank Gollapudi
Ranch Hand
Posts: 33
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Peter Johnson wrote:Have you tried running ant with the -v or -d options, that should give you some extra output which might help you solve this.




Thanks for the reply Peter, i haven't run it with -v before and now ran it and found the problem. The problem was actually me giving the name of the class wrong. Instead of TestNGAntTask i gave it as TESTNGAntTask (used unnecessary uppercase value).

Thanks a lot.
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic