简体   繁体   中英

Exception while running a TestNG test

I cannot seem to run any test at all as I am getting the following exception:

java.lang.AbstractMethodError: org.testng.remote.RemoteTestNG$DelegatingTestRunnerFactory.newTestRunner(Lorg/testng/ISuite;Lorg/testng/xml/XmlTest;Ljava/util/Collection;Ljava/util/List;)Lorg/testng/TestRunner; at org.testng.SuiteRunner$ProxyTestRunnerFactory.newTestRunner

We use TestNG, and the jar file I have in my dependencies is the following:

testng.6.9.12

Any ideas?

升级到最新版本的IntelliJ 2016.1修复了该问题。

I also had the AbstractMethodError while running a testNG suite. Here was the solution that worked for me:

  1. Open the Registry in Intellij

    • (On a Mac)
    • Press: Command Option Shift /
    • Click: Registry...
  2. Check the testng_sm_runner box value

Basically, I followed the instructions here: https://youtrack.jetbrains.com/issue/IDEA-143967#comment=27-1089937

You can try by updating the TestNG plugin of your IDE. There are chances that the TestNG version you are using and TestNG plugin that is installed in your IDE is not compatible. So after updating, there is a chance that it will work.

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.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM