【问题标题】:Error running TestNG under Eclipse "not a supported TestNG version"在 Eclipse 下运行 TestNG 时出错“不是受支持的 TestNG 版本”
【发布时间】:2016-04-12 20:11:38
【问题描述】:

我在 Eclipse Kepler 中设置了我的 Maven 项目。 pom.xml 文件依赖于 TestNg 6.0.1。当我右键单击我的项目时,它会显示选项“作为 TestNG 运行”。但是当我点击它时,Eclipse 显示错误:

Exception in thread "main" org.testng.TestNGException: 
6.0.1 is not a supported TestNG version
  at org.testng.remote.support.ServiceLoaderHelper.getFirst(ServiceLoaderHelper.java:22)
  at org.testng.remote.RemoteTestNG.main(RemoteTestNG.java:43)

POM 中的依赖关系:

<dependency>
    <groupId>org.testng</groupId>
    <artifactId>testng</artifactId>
    <version>6.0.1</version>
</dependency>

【问题讨论】:

    标签: eclipse maven testng


    【解决方案1】:

    在您的 POM 中使用最新版本的 TestNG 作为依赖项。

    可能您的 TestNG Eclipse 插件是最新的,而用作 POM 依赖项的 TestNG 版本太旧。试试6.9.10

    【讨论】:

    • 6.9.11 也可用
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2020-09-18
    • 1970-01-01
    • 1970-01-01
    • 2017-12-30
    相关资源
    最近更新 更多