Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

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

 
Shashank Gollapudi
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
 
Peter Johnson
author
Bartender
Posts: 5852
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.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic