java - NoClassDefFoundError: org/testng/TestNG -
this error
noclassdeffounderror: org/testng/testng
appears when i'm trying run test testng.xml file using intellij idea. running test 1 one works running whole gradle project points testng.xml
, grade core-test:test
( on project i'm using appium + intellij + testng )
but when i'm running testng.xml using intellij i'm getting message after pressing run:
exception in thread "main" java.lang.noclassdeffounderror: org/testng/testng @ java.lang.classloader.defineclass1(native method) @ java.lang.classloader.defineclass(classloader.java:763) @ java.security.secureclassloader.defineclass(secureclassloader.java:142) @ java.net.urlclassloader.defineclass(urlclassloader.java:467) @ java.net.urlclassloader.access$100(urlclassloader.java:73) @ java.net.urlclassloader$1.run(urlclassloader.java:368) @ java.net.urlclassloader$1.run(urlclassloader.java:362) @ java.security.accesscontroller.doprivileged(native method) @ java.net.urlclassloader.findclass(urlclassloader.java:361) @ java.lang.classloader.loadclass(classloader.java:424) @ sun.misc.launcher$appclassloader.loadclass(launcher.java:331) @ java.lang.classloader.loadclass(classloader.java:357) @ org.testng.remotetestngstarter.main(remotetestngstarter.java:120) @ sun.reflect.nativemethodaccessorimpl.invoke0(native method) @ sun.reflect.nativemethodaccessorimpl.invoke(nativemethodaccessorimpl.java:62) @ sun.reflect.delegatingmethodaccessorimpl.invoke(delegatingmethodaccessorimpl.java:43) @ java.lang.reflect.method.invoke(method.java:498) @ com.intellij.rt.execution.application.appmain.main(appmain.java:147) caused by: java.lang.classnotfoundexception: org.testng.testng @ java.net.urlclassloader.findclass(urlclassloader.java:381) @ java.lang.classloader.loadclass(classloader.java:424) @ sun.misc.launcher$appclassloader.loadclass(launcher.java:331) @ java.lang.classloader.loadclass(classloader.java:357) ... 18 more
i found solution posted here: https://intellij-support.jetbrains.com/hc/en-us/community/posts/206597869-cannot-launch-ngtest-runner-in-intellij-idea-2016-1
i got work selecting "in whole project" (i had "in single module" selected) under configuration tab in testng "run/debug configurations."
however, prior configuration worked in intellij idea 15, me, seems may have come breaking change newer ide.
it worked me.
Comments
Post a Comment