Unable to scripts with TestNG | Selenium Forum
M
Posted on 20/09/2016
Hi I am trying to run scripts with TestNG framework. I unstalled TestNG and reinstalled again. Still getting the same issue again. I am getting below error.

at java.lang.Class.getDeclaredMethods0(Native Method)
at java.lang.Class.privateGetDeclaredMethods(Unknown Source)
at java.lang.Class.getMethod0(Unknown Source)
at java.lang.Class.getMethod(Unknown Source)
at sun.launcher.LauncherHelper.getMainMethod(Unknown Source)
at sun.launcher.LauncherHelper.checkAndLoadMain(Unknown Source)
Caused by: java.lang.ClassNotFoundException: org.testng.TestNGException
at java.net.URLClassLoader$1.run(Unknown Source)
at java.net.URLClassLoader$1.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
... 6 more

Regards,
Sadananda.

M
Replied on 20/09/2016

how are you running this? though testng.xml?


M
Replied on 20/09/2016

I didn't get you. I am running normal way how we use to run with Junit framework. If you want i will show it in skype.


M
Replied on 20/09/2016

are you running through
testng.xml
or maven
or ant
or are you simply right clicking on java file run as>> testng test?


M
Replied on 20/09/2016

simply right clicking on java file run as TestNG


M
Replied on 20/09/2016

Can someone help me to resolve the issue.


M
Replied on 20/09/2016

I m not able to move ahead


M
Replied on 20/09/2016

come to skype [color=#FF0000:27qr6l2a]qtpselenium1[/color:27qr6l2a]


M
Replied on 22/09/2016

Please find the screen shot.


M
Replied on 22/09/2016

Attaching one more screen shot


M
Replied on 22/09/2016

contact me skype tomorrow(23 sept) at 12:30 pm IST.


M
Replied on 23/09/2016

Was it running with simple program, like:
=============
package javalearning;
import org.testng.annotations.Test;
public class Mod1_TestNG_1 {
@Test
public void test(){
System.out.println("TEST");

}

}
============================================
if NO and still encountering issue :

Could you please help with TestNG version you are using.
TestNG only works with JDK version 1.7 and above please check that.