0

We have written VAPI-XP test cases in QC and created a required folder structure in QC:-Resources. Which contains all the prerequisite classes in JUnit. This approach is successfully working for us to run the JUnit test cases from QC. Now, we are trying same approach to run testNG test cases from QC, after doing required changes, facing issues. Below is the error message we received in QC Script running screen:

C:\SeleniumFramework2.0>java org.testng.TestNG C:\SeleniumFramework2.0\testNGSanity.xml
java.lang.NoClassDefFoundError: com/beust/jcommander/ParameterException
at java.lang.Class.getDeclaredMethods0(Native Method)
        at java.lang.Class.privateGetDeclaredMethods(Unknown Source)
        at java.lang.Class.privateGetMethodRecursive(Unknown Source)
        at java.lang.Class.getMethod0(Unknown Source)
        at java.lang.Class.getMethod(Unknown Source)
        at sun.launcher.LauncherHelper.validateMainClass(Unknown Source)
        at sun.launcher.LauncherHelper.checkAndLoadMain(Unknown Source)
Caused by: java.lang.ClassNotFoundException: com.beust.jcommander.ParameterException
        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)
        ... 7 more
Exception in thread "main"
C:\SeleniumFramework2.0>echo "Running`enter code here` testng script"
"Running testng script"`enter code here`

Can anyone please provide some hints or possible areas where we need to check for mistakes. Thanks in advance

GlennV
  • 3,471
  • 4
  • 26
  • 39
Durgesh
  • 585
  • 4
  • 12
  • 33

0 Answers0