I am trying to integrate Team City with a testing framework based on JUnit through ant runner. But every time, I execute test cases it gives me following error...
: junit (<1s)
: java.lang.NoClassDefFoundError: org/apache/tools/ant/taskdefs/optional/junit/JUnitTestRunner
: Caused by: java.lang.ClassNotFoundException: org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner
: at java.net.URLClassLoader$1.run(URLClassLoader.java:200)
: at java.security.AccessController.doPrivileged(Native Method)
: at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
: at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
: at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:276)
: at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
: at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319)
: Exception in thread "main"
: delete (<1s)
: xml.suite.unforked (<1s)
I am using Team City Version 3.1.1 (build 6828) and am able to successfully execute the test cases on the same machine which is build agent without Team City ... even I am able to run test cases using Command Line runner only when I try to use Ant runner execution fails .. giving me error above ...
I have already included required ant and junit jar files in CLASSPATH variable both on the build agent ,environment variable, as additional Ant and java command line parameters but still I receive following error..
My build.xml also includes all the required lib jars .
I would appreciate if you guys can come to my rescue...