java.lang.NoSuchMethodError when running TestNG test
已回答
I'm using IDEA 2016.1 with jdk1.7.0_40. Bundled TestNG-J plugin v8.0 is on. When I'm trying to run test class I get the following error:
Exception in thread "main" java.lang.NoSuchMethodError: org.testng.IDEARemoteTestNG.configure(Lorg/testng/CommandLineArgs;)V
at org.testng.RemoteTestNGStarter.main(RemoteTestNGStarter.java:120)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at com.intellij.rt.execution.application.AppMain.main(AppMain.java:144)
请先登录再写评论。
Please see https://youtrack.jetbrains.com/issue/IDEA-143967.
Thanks. Updating TestNG dependency to 6.9.8 helped
Exception in thread "main" java.lang.NoSuchMethodError: org.testng.IDEARemoteTestNG.configure(Lorg/testng/CommandLineArgs;)V
at org.testng.RemoteTestNGStarter.main(RemoteTestNGStarter.java:126)
Above error found when running intellij
Please guide!
Please try IntelliJ IDEA 2017.1.4: http://www.jetbrains.com/idea/download/index.html.
Not worked!
I have IntelliJ IDEA 2017.1.5
and testNG dependency like below
Please file a bug at https://youtrack.jetbrains.com/issues/IDEA with a complete sample project to reproduce.