Reputation: 3
I am getting the following error when running test cases. i am using testNG latest version and my errors follows like this
java.lang.NoSuchMethodError: org.testng.remote.AbstractRemoteTestNG.addListener(Lorg/testng/ISuiteListener;)V
at org.testng.remote.AbstractRemoteTestNG.run(AbstractRemoteTestNG.java:128)
at org.testng.remote.RemoteTestNG.initAndRun(RemoteTestNG.java:236)
at org.testng.remote.RemoteTestNG.main(RemoteTestNG.java:81)
can anyone help with me a solution
Upvotes: 0
Views: 17074
Reputation: 91
tried this solution it works successfully.
Steps:
Upvotes: 9
Reputation: 1
This error is mostly due to TestNG Plugin not properly installed in eclipse.
Also make sure you have added below 2 jars of the same version.
testng-7.1.0.jar
and testng-7.1.0-sources.jar
Upvotes: 0
Reputation: 21
Issue got resolved after changing TestNG jar from testng-7.4.0 to testng-7.1.0.
Also add TestNG library via configure build if it is missing.
Upvotes: 0
Reputation: 41
i also faced the same problem. Follow some steps it might help you.
Upvotes: 4
Reputation: 11
I had the same issue. Changing my testng
version to 6.8 from 7.x.x solved it.
Upvotes: 1
Reputation: 1
try adding following libraries -
Upvotes: -1
Reputation: 11818
The NoSuchMethodError
indicates that the compiled code you're running is expecting a method in a type, but that it does not exist.
The documentation for the exception class
Thrown if an application tries to call a specified method of a class (either static or instance), and that class no longer has a definition of that method.
Normally, this error is caught by the compiler; this error can only occur at run time if the definition of a class has incompatibly changed.
This suggests that you either have different JARs/classes in your classpath when you run the test than when you compiled it, or you potentially have duplicate JARs of different versions in the classpath.
Upvotes: 0