TestNg error | Selenium Forum
S
Siddharth Rathod Posted on 04/08/2019

Hi,

I created the maven project using cmd and ran the mvn eclipse:eclipse command and then imported the project into eclipse.

When i am trying to run the test cases , I am getting the below error:-

java.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.<init>(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:126)
at org.testng.remote.RemoteTestNG.initAndRun(RemoteTestNG.java:152)
at org.testng.remote.RemoteTestNG.main(RemoteTestNG.java:57)


A
Ashish Thakur Replied on 06/08/2019

Which file are you trying to execute?

Please follow the video carefully as you're missing some bits and pieces.

If the issue persists let us know about it here with more detailed information.


S
Siddharth Rathod Replied on 07/08/2019

I am trying to execute the file which is explain in Module 23 - 2nd video abouit creating a maven project and importing it into eclipse and then running a simple testNg file.

please find the below screenshot of the error and file which i am trying to execute.

 

 


A
Ashish Thakur Replied on 08/08/2019

Please export your project in a zip file and share it with us so that we can suggest a solution.


S
Suyash Replied on 20/05/2020

Hi team,

I am also facing this isse.could you plese resolve that ?

Responsive image


A
Ashish Thakur Replied on 21/05/2020

Testng is not mentioned in POM