I have imported one Maven project for automated test cases. I am getting the error java.lang.NoSuchMethodError: org.testng.TestRunner.addListener(Ljava/lang/Object;)V
when run the test case
I have tried by reinstalling TestNG in eclipse
ava.lang.NoSuchMethodError: org.testng.TestRunner.addListener(Ljava/lang/Object;)V at org.testng.remote.support.RemoteTestNG6_9_10$1.newTestRunner(RemoteTestNG6_9_10.java:32) at org.testng.remote.support.RemoteTestNG6_9_10$DelegatingTestRunnerFactory.newTestRunner(RemoteTestNG6_9_10.java:61) at org.testng.SuiteRunner$ProxyTestRunnerFactory.newTestRunner(SuiteRunner.java:713) at org.testng.SuiteRunner.init(SuiteRunner.java:260) at org.testng.SuiteRunner.(SuiteRunner.java:198) at org.testng.TestNG.createSuiteRunner(TestNG.java:1295) at org.testng.TestNG.createSuiteRunners(TestNG.java:1273) at org.testng.TestNG.runSuitesLocally(TestNG.java:1128) at org.testng.TestNG.runSuites(TestNG.java:1049) at org.testng.TestNG.run(TestNG.java:1017) at org.testng.remote.AbstractRemoteTestNG.run(AbstractRemoteTestNG.java:132) at org.testng.remote.RemoteTestNG.initAndRun(RemoteTestNG.java:236) at org.testng.remote.RemoteTestNG.main(RemoteTestNG.java:81)
Thanks. The problem was caused due the higher version of testng maven dependancy
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.