zoukankan      html  css  js  c++  java
  • TestNG


    TestNG无法启动,报错:NoClassDefFoundError

    Exception in thread "main" java.lang.NoClassDefFoundError: org/testng/remote/RemoteArgs
    at org.testng.RemoteTestNGStarter.main(RemoteTestNGStarter.java:119)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:483)
    at com.intellij.rt.execution.application.AppMain.main(AppMain.java:144)
    Caused by: java.lang.ClassNotFoundException: org.testng.remote.RemoteArgs
    at java.net.URLClassLoader$1.run(URLClassLoader.java:372)
    at java.net.URLClassLoader$1.run(URLClassLoader.java:361)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.net.URLClassLoader.findClass(URLClassLoader.java:360)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
    at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:308)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
    ... 6 more
    解决方法:
    我用的是最新版的TestNG-> 6.10版本,换成 6.8 就可以了。
    如果是用Maven 管理Java的jar包的话,像这样写:
    <dependency>
    <groupId>org.testng</groupId>
    <artifactId>testng</artifactId>
    <version>6.8</version>
    <!--最新版本6.10 和 5.8 都有BUG,启动不了,提示找不到入口-->
    <scope>test</scope>
    </dependency>

    依赖关系

     




  • 相关阅读:
    许昌 地图。满屏的饭馆。
    Python中的math和保留小数位数方法
    Python中的math和保留小数位数方法
    python对XML 操作
    python对XML 操作
    python的enumerate()函数
    python的enumerate()函数
    [COJ0989]WZJ的数据结构(负十一)
    [OpenJudge 3066]随机序列
    [OpenJudge 3064]坠落的蚂蚁
  • 原文地址:https://www.cnblogs.com/xiaoCong2016/p/6526672.html
Copyright © 2011-2022 走看看