org.testng.TestNGException:sun.security.provider.certpath.SunCertPathBuilderException:无法找到到请求目标的有效证书路径

 收藏

我正在运行的testng套件出现错误,但是当我运行单个testng时测试其运行没有错误

org.testng.TestNGException:sun.security.provider.certpath.SunCertPathBuilderException:无法找到到请求目标的有效证书路径

org.testng.TestNGException:sun.security.provider.certpath.SunCertPathBuilderException:无法找到到请求目标的有效证书路径     在org.testng.TestNG.initializeSuitesAndJarFile(TestNG.java:325)     在org.testng.remote.AbstractRemoteTestNG.initialize(AbstractRemoteTestNG.java:136)     在org.testng.remote.AbstractRemoteTestNG.run(AbstractRemoteTestNG.java:97)     在org.testng.remote.RemoteTestNG.initAndRun(RemoteTestNG.java:251)     在org.testng.remote.RemoteTestNG.main(RemoteTestNG.java:77)

回复
  • 哼~ 回复

    使用以下xml标头:

    <?xml version="1.0" encoding="UTF-8"?>
    <!DOCTYPE suite SYSTEM "http://testng.org/testng-1.0.dtd" >
    

    而不是官方的:

    <!DOCTYPE suite SYSTEM "https://testng.org/testng-1.0.dtd" >