我试图创建一个 testng 类并在 Eclipse 中运行它,但我得到以下错误 -
java.lang.AbstractMethodError: org.testng.remote.RemoteTestNG$DelegatingTestRunnerFactory.newTestRunner(Lorg/testng/ISuite;Lorg/testng/xml/XmlTest;Ljava/util/Collection;)Lorg/testng/TestRunner;
at org.testng.SuiteRunner$ProxyTestRunnerFactory.newTestRunner(SuiteRunner.java:587)
at org.testng.SuiteRunner.init(SuiteRunner.java:161)
at org.testng.SuiteRunner.<init>(SuiteRunner.java:114)
at org.testng.TestNG.createSuiteRunner(TestNG.java:1290)
at org.testng.TestNG.createSuiteRunners(TestNG.java:1277)
at org.testng.TestNG.runSuitesLocally(TestNG.java:1131)
at org.testng.TestNG.run(TestNG.java:1048)
at org.testng.remote.RemoteTestNG.run(RemoteTestNG.java:115)
at org.testng.remote.RemoteTestNG.initAndRun(RemoteTestNG.java:207)
at org.testng.remote.RemoteTestNG.main(RemoteTestNG.java:178)
我的简单课
package test.selenium_project;
import org.testng.annotations.Test;
public class SampleNg {
@Test
public void f() {
System.out.println("test");
}
}
使用的罐子
testng-6.5.1