• 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 all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Bear Bibeault
  • Ron McLeod
  • Jeanne Boyarsky
  • Paul Clapham
Sheriffs:
  • Tim Cooke
  • Liutauras Vilda
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • fred rosenberger
  • salvin francis
Bartenders:
  • Piet Souris
  • Frits Walraven
  • Carey Brown

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

 
Ranch Hand
Posts: 33
  • Mark post as helpful
  • send pies
  • 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
  • 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
  • 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.
    Bookmark Topic Watch Topic
  • New Topic